MAPG-235 highscores added to the end of challenge
This commit is contained in:
1 parent
599d8bf153
commit
b00fe4ebe3
6 files changed
+150
-10
No files matched your search
@@ -193,6 +193,14 @@ class GameFlowController
|
||||
|
||||
if (!isset($currentPlace)) { // game finished
|
||||
$response['finished'] = true;
|
||||
|
||||
// list all players who finished the challenge
|
||||
$response['finishers'] = [];
|
||||
foreach ($this->userInChallengeRepository->getAllByChallengeWithUsers($challenge) as $userInChallenge) {
|
||||
if ($userInChallenge->getCurrentRound() == $currentRound && $userInChallenge->getUser()->getId() != $userId) {
|
||||
$response['finishers'][] = $userInChallenge->getUser()->getDisplayName();
|
||||
}
|
||||
}
|
||||
} else { // continue game
|
||||
$response['place'] = [
|
||||
'panoId' => $currentPlace->getPanoIdCached(),
|
||||
|
||||
Reference in new issue
Block a user