From a4149c6703653b2d0d5f3da4277d7fe065048edd Mon Sep 17 00:00:00 2001 From: Arun Persaud Date: Sun, 18 May 2008 11:48:25 -0700 Subject: BUGFIX: show schweinchen has highest trump in your hand correctly shows both schweinchen as highest trump or just one depending on the rules. If only one don't allow to play it unless the first fox has been played. Signed-off-by: Arun Persaud --- include/game.php | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'include/game.php') diff --git a/include/game.php b/include/game.php index 668aa1f..0ec52e2 100644 --- a/include/game.php +++ b/include/game.php @@ -96,6 +96,8 @@ else } /* end check for Schweinchen */ +set_gametype($gametype); /* this sets the $CARDS variable */ + /* put everyting in a form */ echo "
\n"; @@ -211,7 +213,7 @@ switch($mystatus) case 'init': /* here we ask the player if he is sick */ $mycards = DB_get_hand($me); - sort($mycards); + $mycards = mysort($mycards,$gametype); /* output sickness of other playes, in case the already selected and are sitting in front of the current player */ echo "\n
    \n"; @@ -333,7 +335,7 @@ switch($mystatus) if($mystatus=='check') { $mycards = DB_get_hand($me); - sort($mycards); + $mycards = mysort($mycards,$gametype); /* output sickness of other playes, in case the already selected and are sitting in front of the current player */ echo "\n
      \n"; @@ -1722,7 +1724,10 @@ switch($mystatus) foreach($mycards as $card) { - if($followsuit && !same_type($card,$firstcard)) + if( ($followsuit && !same_type($card,$firstcard)) || + ( (int)($card)==19 && ($RULES['schweinchen']=='second'||$RULES['schweinchen']=='secondaftercall') + && $GAME['schweinchen-who']==$me && !$GAME['schweinchen-first'] ) + ) display_card($card,$PREF["cardset"]); else display_link_card($card,$PREF["cardset"]); -- cgit v1.2.3-18-g5258