BUGFIX: problem with Schweinchen during pre-game phase
[e-DoKo.git] / include / game.php
index b41ca26382b2b45283622106b7b2f6a019cbc6c8..668aa1fe06096a59d2e2512116fe0e135a74b3b0 100644 (file)
@@ -63,9 +63,18 @@ if($gametype=="solo")
  * save information in $GAME
  */
 $ok=0;
  * 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)
 {
 
 if($ok)
 {