BUGIFX: more accurate display of whos turn it is
[e-DoKo.git] / include / game.php
index a90d8b2dea1418bfdd3be82a2461a92a7b216dc0..b8a2fcb2dc2e88c4b6e187a2ce264aff35c7e836 100644 (file)
@@ -98,7 +98,11 @@ if($ok)
 }
 /* end check for Schweinchen */
 
-set_gametype($gametype); /* this sets the $CARDS variable */
+/* set the $CARDS variable, needed for sorting the cards
+ * we set it to normal so that the pre-game phase is handled ok
+ * and later set it to the correct game type that is played
+ */
+set_gametype('normal');
 
 /* put everyting in a form */
 echo "<form action=\"index.php?action=game&me=$me\" method=\"post\">\n";
@@ -185,6 +189,7 @@ switch($mystatus)
                    /* whos turn is it? */
                    DB_set_player_by_gameid($gameid,$user);
                    $ok = 0;
+                   break;
                  }
              };
            if($ok)
@@ -376,6 +381,7 @@ switch($mystatus)
          {
            $ok = 0;
            DB_set_player_by_gameid($gameid,$user);
+           break;
          }
       };
 
@@ -903,6 +909,7 @@ switch($mystatus)
              {
                $ok = 0;
                DB_set_player_by_gameid($gameid,$user);
+               break;
              }
          }
        if($ok)