feature/MAPG-203-initial-multiplayer-implementation #5
@ -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);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user