X-Git-Url: https://git.nubati.net/cgi-bin/gitweb.cgi?p=e-DoKo.git;a=blobdiff_plain;f=functions.php;h=e9ead78166e0c3b3031f2dee5a01d8fd02e323ac;hp=2077d0019ac98ce2287c41a861726b4b6ce262e8;hb=22390bdc9d72fe7b32375d3be898ee0fd8137a88;hpb=d57105094a2e224bd7f4f03b11ab96a45383fea2 diff --git a/functions.php b/functions.php index 2077d00..e9ead78 100644 --- a/functions.php +++ b/functions.php @@ -156,14 +156,13 @@ function get_winner($p,$mode) $c3 = $p[3]; $c4 = $p[4]; - /* find out who won */ /* 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; /* second card is better than first and better than the rest */ - if( !compare_cards($c1,$c2,$mode) && compare_cards($c2,$c3,$mode) && compare_cards($c2,$c4,$mode) ) + if( !compare_cards($c1,$c2,$mode) && compare_cards($c2,$c3,$mode) && compare_cards($c2,$c4,$mode) ) return 2; /* third card is better than first card and better than last */