Compare commits

..

3 Commits

Author SHA1 Message Date
6e03476173
Merge pull request 'bugfix/MAPG-203-fix-singleplayer' (#9) from bugfix/MAPG-203-fix-singleplayer into develop
All checks were successful
default-pipeline default-pipeline #39
Reviewed-on: https://gitea.e5tv.hu/esoko/mapguesser/pulls/9
2021-03-20 21:00:14 +01:00
f3ec71d6dd
MAPG-203 fix condition in game.js
All checks were successful
default-pipeline default-pipeline #38
2021-03-20 20:59:10 +01:00
c2f0a1dd51
MAPG-203 fix signatures in GameController 2021-03-20 20:58:57 +01:00
2 changed files with 4 additions and 4 deletions

View File

@ -520,7 +520,7 @@
scoreInfo.children[1].style.display = 'block'; scoreInfo.children[1].style.display = 'block';
document.getElementById('showSummaryButton').style.display = null; document.getElementById('showSummaryButton').style.display = null;
if (Game.multi.owner) { if (!room || Game.multi.owner) {
document.getElementById('startNewGameButton').style.display = 'block'; document.getElementById('startNewGameButton').style.display = 'block';
} }

View File

@ -72,14 +72,14 @@ class GameController
); );
} }
public function getMultiGame() public function getMultiGame(): IContent
{ {
$roomId = $this->request->query('roomId'); $roomId = $this->request->query('roomId');
return new HtmlContent('game', ['roomId' => $roomId]); return new HtmlContent('game', ['roomId' => $roomId]);
} }
public function prepareGame(int $mapId): IContent public function prepareGame(): IContent
{ {
$mapId = (int) $this->request->query('mapId'); $mapId = (int) $this->request->query('mapId');
$map = $this->mapRepository->getById($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(); $session = $this->request->session();