Fix game controls not initialising correctly

This commit is contained in:
Andrio Celos 2022-12-26 14:49:43 +11:00
parent 0cdfc3bbbd
commit beec071387
2 changed files with 9 additions and 1 deletions

View File

@ -53,6 +53,14 @@ cols[4][21] = Space.SpecialInactive1;
cols[4][4] = Space.SpecialInactive2;
board.resize(cols);
function initGame() {
playControls.hidden = false;
resultContainer.hidden = true;
replayControls.hidden = true;
gameButtonsContainer.hidden = false;
showPage('game');
}
function initReplay() {
playControls.hidden = true;
resultContainer.hidden = true;

View File

@ -124,7 +124,7 @@ function onGameStateChange(game: any, playerData: PlayerData | null) {
updateHand(playerData);
board.autoHighlight = false;
redrawModal.hidden = true;
showPage('game');
initGame();
gameButtonsContainer.hidden = currentGame.me == null || game.state == GameState.Ended;