feature/MAPG-203-initial-multiplayer-implementation #5

Merged
bence merged 4 commits from feature/MAPG-203-initial-multiplayer-implementation into develop 2021-03-15 12:32:54 +01:00
Showing only changes of commit 2c4d809d49 - Show all commits

View File

@ -29,17 +29,14 @@ class PlaceRepository
} }
//TODO: use Map instead of id //TODO: use Map instead of id
public function getRandomForMapWithValidPano(int $mapId, array $exclude = [], array &$placesWithoutPano): Place public function getRandomForMapWithValidPano(int $mapId, array $exclude = []): Place
{ {
$placesWithoutPano = [];
do { do {
$place = $this->selectRandomFromDbForMap($mapId, $exclude); $place = $this->selectRandomFromDbForMap($mapId, $exclude);
$panoId = $place->getFreshPanoId(); $panoId = $place->getFreshPanoId();
if ($panoId === null) { if ($panoId === null) {
$placesWithoutPano[] = $exclude[] = $place->getId(); $exclude[] = $place->getId();
} }
} while ($panoId === null); } while ($panoId === null);