$messages[] = _('Checking if someone else selected solo, nines, wedding or poverty.');
+ /* in case the user can go do the next stage, we want to skip the break statement at the
+ * end. We keep track of these cases using this variable
+ */
+ $nobreak=0;
+
/* check if everyone has reached this stage */
$userids = DB_get_all_userid_by_gameid($gameid);
$ok = 1;
$messages[] = _('Ok, everyone is done... figuring out what kind of game we are playing.');
/* gametype for displaying it (hides hidden solo)*/
- $GT = get_display_gametype($gameid);
+ $GT = get_display_gametype($gameid);
$startplayer = DB_get_startplayer_by_gameid($gameid);
}
}
else
- $messages[] = sprintf(_('Please, <a href="%s">start</a> the game.'),$INDEX."?action=game&me=$me").
- "<br />\n";
+ {
+ $messages[] = sprintf(_('Please, <a href="%s">start</a> the game.'),$INDEX."?action=game&me=$me").
+ "<br />\n";
+ $nobreak=1;
+ }
}
else
{
$whoid = DB_get_userid('gameid-position',$gameid,$who);
if($whoid==$myid)
- $messages[] = sprintf(_('Please, <a href="%s">start</a> the game.'),$INDEX."?action=game&me=$me").
- "<br /\n";
+ {
+ $messages[] = sprintf(_('Please, <a href="%s">start</a> the game.'),$INDEX."?action=game&me=$me").
+ "<br /\n";
+ $nobreak=1;
+ }
else
{
$whohash = DB_get_hash_from_game_and_pos($gameid,$who);
}
}
}
- break;
+ if(!$nobreak)
+ break;
case 'poverty':
/* user only gets here in a poverty game, several things have to be handled here:
* it is easier to check B) first
*/
+ /* in case the user can go do the next stage, we want to skip the break statement at the
+ * end. We keep track of these cases using this variable
+ */
+ $nobreak=0;
+
set_gametype($gametype); /* this sets the $CARDS variable */
$myparty = DB_get_party_by_hash($me);
}
}
$messages[] = sprintf(_('Please, <a href="%s">continue</a> here'),$INDEX."?action=game&me=$me");
+ $nobreak = 1;
}
}
- break;
+ if(!$nobreak)
+ break;
case 'play':
case 'gameover':