diff options
author | Arun Persaud <arun@nubati.net> | 2008-05-18 11:11:40 -0700 |
---|---|---|
committer | Arun Persaud <arun@nubati.net> | 2008-05-18 11:11:40 -0700 |
commit | 2a2c6ad2b883e1f0c9a2f5bf3f742452ce7ef540 (patch) | |
tree | 70e073b1a6f36418a653ac98c59da35690edf40e /include | |
parent | f922adf616e3a3effca51f85edfdbc11eef91799 (diff) | |
download | e-DoKo-2a2c6ad2b883e1f0c9a2f5bf3f742452ce7ef540.tar.gz e-DoKo-2a2c6ad2b883e1f0c9a2f5bf3f742452ce7ef540.tar.bz2 e-DoKo-2a2c6ad2b883e1f0c9a2f5bf3f742452ce7ef540.zip |
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 <arun@nubati.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/game.php | 15 |
1 files changed, 12 insertions, 3 deletions
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) { |