BUGFIX: problem with Schweinchen during pre-game phase
authorArun Persaud <arun@nubati.net>
Sun, 18 May 2008 18:11:40 +0000 (11:11 -0700)
committerArun Persaud <arun@nubati.net>
Sun, 18 May 2008 18:11:40 +0000 (11:11 -0700)
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>
include/game.php

index b41ca26382b2b45283622106b7b2f6a019cbc6c8..668aa1fe06096a59d2e2512116fe0e135a74b3b0 100644 (file)
@@ -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)
 {