From: Arun Persaud Date: Sun, 18 May 2008 18:11:40 +0000 (-0700) Subject: BUGFIX: problem with Schweinchen during pre-game phase X-Git-Url: https://git.nubati.net/cgi-bin/gitweb.cgi?p=e-DoKo.git;a=commitdiff_plain;h=2a2c6ad2b883e1f0c9a2f5bf3f742452ce7ef540 BUGFIX: problem with Schweinchen during pre-game phase in case a player called solo, the gametype was set so that for other playes Schweinchen wasn't calculated correctly anymore. This could result in trump being counted incorrectly and therefore poverties not being discoverd. Signed-off-by: Arun Persaud --- diff --git a/include/game.php b/include/game.php index b41ca26..668aa1f 100644 --- a/include/game.php +++ b/include/game.php @@ -63,9 +63,18 @@ if($gametype=="solo") * save information in $GAME */ $ok=0; -if( $gametype == 'normal' || $gametype == 'silent' || $gametype=='trump' ) - if( in_array($RULES['schweinchen'],array('both','second','secondaftercall')) ) - $ok=1; +if( $gamestatus == 'pre' ) + { + /* always need to use Schweinchen to figure out for example who has poverty */ + $ok=1; + } +else + { + /* in a game Schweinchen is not valid in all types of games */ + if( $gametype == 'normal' || $gametype == 'silent' || $gametype=='trump' ) + if( in_array($RULES['schweinchen'],array('both','second','secondaftercall')) ) + $ok=1; + } if($ok) {