foreach($args as $arg)
{
$ok = $ok * isset($_REQUEST[$arg]);
- /* echo "$arg: ok = $ok <br />";
- */
+ /*echo "$arg: ok = $ok <br />";
+ */
}
return $ok;
}
$c3 = $p[3];
$c4 = $p[4];
-
/* first card is better than all the rest */
if( compare_cards($c1,$c2,$mode) && compare_cards($c1,$c3,$mode) && compare_cards($c1,$c4,$mode) )
return 1;
}
}
+function mysort($cards,$gametype)
+{
+ usort ( $cards, "sort_comp" );
+ return $cards;
+}
+
+function sort_comp($a,$b)
+{
+ global $TRUMP,$DIAMONDS,$HEARTS,$CLUBS,$SPADES;
+
+ $ALL = array();
+ $ALL = array_merge($TRUMP,$DIAMONDS,$CLUBS,$HEARTS,$SPADES,$DIAMONDS);
+
+ return pos_array($a,$ALL)-pos_array($b,$ALL);
+}
+
?>
\ No newline at end of file