diff --git a/public/static/js/game.js b/public/static/js/game.js index 7f1016f..3e7ec18 100644 --- a/public/static/js/game.js +++ b/public/static/js/game.js @@ -520,7 +520,7 @@ scoreInfo.children[1].style.display = 'block'; document.getElementById('showSummaryButton').style.display = null; - if (Game.multi.owner) { + if (!room || Game.multi.owner) { document.getElementById('startNewGameButton').style.display = 'block'; } diff --git a/src/Controller/GameController.php b/src/Controller/GameController.php index bd9a281..23cf3c3 100644 --- a/src/Controller/GameController.php +++ b/src/Controller/GameController.php @@ -72,14 +72,14 @@ class GameController ); } - public function getMultiGame() + public function getMultiGame(): IContent { $roomId = $this->request->query('roomId'); return new HtmlContent('game', ['roomId' => $roomId]); } - public function prepareGame(int $mapId): IContent + public function prepareGame(): IContent { $mapId = (int) $this->request->query('mapId'); $map = $this->mapRepository->getById($mapId); @@ -146,7 +146,7 @@ class GameController ]); } - private function getMultiToken(string $roomId, bool $forceNew = false) + private function getMultiToken(string $roomId): string { $session = $this->request->session();