diff options
author | Arun Persaud <arun@nubati.net> | 2008-05-18 11:48:25 -0700 |
---|---|---|
committer | Arun Persaud <arun@nubati.net> | 2008-05-18 11:48:25 -0700 |
commit | a4149c6703653b2d0d5f3da4277d7fe065048edd (patch) | |
tree | 66231c48787b3bf9400d53c7289f73eb4cfbb26b /include/game.php | |
parent | 2a2c6ad2b883e1f0c9a2f5bf3f742452ce7ef540 (diff) | |
download | e-DoKo-a4149c6703653b2d0d5f3da4277d7fe065048edd.tar.gz e-DoKo-a4149c6703653b2d0d5f3da4277d7fe065048edd.tar.bz2 e-DoKo-a4149c6703653b2d0d5f3da4277d7fe065048edd.zip |
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 <arun@nubati.net>
Diffstat (limited to 'include/game.php')
-rw-r--r-- | include/game.php | 11 |
1 files changed, 8 insertions, 3 deletions
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 "<form action=\"index.php?action=game&me=$me\" method=\"post\">\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<ul class=\"tricks\">\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<ul class=\"tricks\">\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"]); |