add game ended message
This commit is contained in:
parent
19735d340d
commit
dcb98f8ffe
@ -161,6 +161,10 @@ const GamePage: FunctionComponent<{
|
|||||||
if (!game || isSpectator || !userKey) {
|
if (!game || isSpectator || !userKey) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if(game.mancalaGame.state === "ended") {
|
||||||
|
notyf.error(context.texts.GameEnded);
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (Util.checkConnectionAndMaybeAlert(context)) return;
|
if (Util.checkConnectionAndMaybeAlert(context)) return;
|
||||||
if (game.mancalaGame.getPlayerIdByIndex(index) !== userKey) {
|
if (game.mancalaGame.getPlayerIdByIndex(index) !== userKey) {
|
||||||
notyf.error(context.texts.UCanOnlyPlayYourOwnPits);
|
notyf.error(context.texts.UCanOnlyPlayYourOwnPits);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user