From dca88ac9a0d412987058c82247bb05b54b802225 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=91cze=20Bence?= Date: Fri, 22 May 2020 01:32:30 +0200 Subject: [PATCH] MAPG-25 don't query place in GameController --- src/Controller/GameController.php | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/Controller/GameController.php b/src/Controller/GameController.php index 43230dd..4e74cd0 100644 --- a/src/Controller/GameController.php +++ b/src/Controller/GameController.php @@ -20,13 +20,6 @@ class GameController implements ControllerInterface $stmt->execute(); $map = $stmt->get_result()->fetch_assoc(); - // using RAND() for the time being, could be changed in the future - $stmt = $mysql->prepare('SELECT lat, lng FROM places WHERE map_id=? ORDER BY RAND() LIMIT 1'); - $stmt->bind_param("i", $mapId); - $stmt->execute(); - $place = $stmt->get_result()->fetch_assoc(); - - $realPosition = new Position($place['lat'], $place['lng']); $bounds = Bounds::createDirectly($map['bound_south_lat'], $map['bound_west_lng'], $map['bound_north_lat'], $map['bound_east_lng']); $data = compact('bounds');