fixing comments
default-pipeline default-pipeline #175

This commit is contained in:
balazs committed 2021-05-06 20:25:48 +02:00
1 parent 8b3c95bdc7
commit 8d8074977b
2 files changed
+3 -3

No files matched your search

+2 -2
View File
@@ -31,9 +31,9 @@ class PlaceRepository
//TODO: use Map and User instead of id
public function getRandomNPlaces(int $mapId, int $n, ?int $userId): array
{
if(!isset($userId)) { // anonymous single player or multiplayer game
if(!isset($userId)) { // anonymous single player
return $this->getRandomNForMapWithValidPano($mapId, $n);
} else { // authorized user
} else { // authorized user or multiplayer game with selection based on what the host played before
$unvisitedPlaces = $this->getRandomUnvisitedNForMapWithValidPano($mapId, $n, $userId);
$oldPlaces = $this->getRandomOldNForMapWithValidPano($mapId, $n - count($unvisitedPlaces), $userId);
return array_merge($unvisitedPlaces, $oldPlaces);