X-Git-Url: https://git.nubati.net/cgi-bin/gitweb.cgi?p=e-DoKo.git;a=blobdiff_plain;f=include%2Fgame.php;h=a90d8b2dea1418bfdd3be82a2461a92a7b216dc0;hp=0ec52e2da554c5a13f387dc557b2d7380647243d;hb=a40c1ed8a796ad846a254da83a83ae92c3184228;hpb=a4149c6703653b2d0d5f3da4277d7fe065048edd diff --git a/include/game.php b/include/game.php index 0ec52e2..a90d8b2 100644 --- a/include/game.php +++ b/include/game.php @@ -26,6 +26,8 @@ if(!$myid) exit(); } +global $GAME,$RULES,$CARDS; + /* user might get here by clicking on the link in an email, so session might not be set */ if(isset($_SESSION["name"])) output_status($_SESSION["name"]); @@ -76,6 +78,11 @@ else $ok=1; } +/* these are the defaults */ +$GAME['schweinchen-who'] = NULL; +$GAME['schweinchen-first'] = NULL; +$GAME['schweinchen-second'] = NULL; + if($ok) { /* need to check for Schweinchen */ @@ -89,11 +96,6 @@ if($ok) $GAME['schweinchen-first'] = 0; /* to keep track if they have been played already */ $GAME['schweinchen-second'] = 0; } -else -{ - /* no need to check for Schweinchen */ - $GAME['schweinchen-who']=NULL; -} /* end check for Schweinchen */ set_gametype($gametype); /* this sets the $CARDS variable */ @@ -1129,6 +1131,7 @@ switch($mystatus) { $card = $_REQUEST["card"]; $handid = DB_get_handid('hash',$me); + $commentSchweinchen =""; /* used to add a comment when Schweinchen is being played */ /* check if we have card and that we haven't played it yet*/ /* set played in hand_card to true where hand_id and card_id*/