feature/MAPG-235-basic-challenge-mode #48
@ -149,6 +149,7 @@ class GameFlowController
|
||||
{
|
||||
$currentPlace = $this->placeRepository->getByRoundInChallenge($challenge, $currentRound);
|
||||
|
||||
// if the last round was played ($currentPlace == null) or history is explicitly requested (for initializing)
|
||||
if (!isset($currentPlace) || $withHistory) {
|
||||
|
||||
$withRelations = [User::class, PlaceInChallenge::class, Place::class];
|
||||
@ -239,7 +240,7 @@ class GameFlowController
|
||||
|
||||
$response = $this->prepareChallengeResponse($userId, $challenge, $currentRound, true);
|
||||
|
||||
if ($challenge->getTimeLimitType() === 'game' && $userInChallenge->getCurrentRound() > 0) {
|
||||
if ($challenge->getTimeLimitType() === 'game' && $challenge->getTimeLimit() !== null && $userInChallenge->getCurrentRound() > 0) {
|
||||
$timeLimit = max(10, $userInChallenge->getTimeLeft());
|
||||
$response['restrictions']['timeLimit'] = $timeLimit * 1000;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user