Merge pull request #34 from jhalitaksoy/fix/game-state-message
add game ended message
This commit is contained in:
commit
24b01c151c
@ -161,6 +161,10 @@ const GamePage: FunctionComponent<{
|
||||
if (!game || isSpectator || !userKey) {
|
||||
return;
|
||||
}
|
||||
if(game.mancalaGame.state === "ended") {
|
||||
notyf.error(context.texts.GameEnded);
|
||||
return;
|
||||
}
|
||||
if (Util.checkConnectionAndMaybeAlert(context)) return;
|
||||
if (game.mancalaGame.getPlayerIdByIndex(index) !== userKey) {
|
||||
notyf.error(context.texts.UCanOnlyPlayYourOwnPits);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user