From c2f0a1dd5100e39c22656777cb7d8bc73f6152bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=91cze=20Bence?= Date: Sat, 20 Mar 2021 20:58:57 +0100 Subject: [PATCH 1/2] MAPG-203 fix signatures in GameController --- src/Controller/GameController.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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(); -- 2.45.2 From f3ec71d6dd48d3b8c34de0bfb083ad53e44e947c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=91cze=20Bence?= Date: Sat, 20 Mar 2021 20:59:10 +0100 Subject: [PATCH 2/2] MAPG-203 fix condition in game.js --- public/static/js/game.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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'; } -- 2.45.2