summaryrefslogtreecommitdiffstats
path: root/functions.php
diff options
context:
space:
mode:
Diffstat (limited to 'functions.php')
-rw-r--r--functions.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/functions.php b/functions.php
index 221bea8..cecc63c 100644
--- a/functions.php
+++ b/functions.php
@@ -523,4 +523,24 @@ function set_gametype($gametype)
}
}
+function mysort($cards,$gametype)
+{
+ global $TRUMP,$DIAMONDS,$HEARTS,$CLUBS,$SPADES;
+
+ switch($gametype) {
+ case normal:
+ case trump:
+ default:
+ $ALL = array_merge($TRUMP,$DIAMONDS,$CLUBS,$HEARTS,$SPADES,$DIAMONDS);
+ break;
+ }
+
+ $compare = create_function("$a, $b", "return pos_array($a,$ALL)-pos_array($b,$ALL);");
+
+ usort ( $cards, $compare );
+
+ return;
+}
+
+
?> \ No newline at end of file