From dc943fa3cbca02779d88e8f7328106ed11eb77a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=91cze=20Bence?= Date: Tue, 19 May 2020 16:13:57 +0200 Subject: [PATCH] MAPG-4 rename GuessController to GameController --- public/index.php | 4 ++-- src/Controller/{GuessController.php => GameController.php} | 4 ++-- views/{guess.php => game.php} | 0 3 files changed, 4 insertions(+), 4 deletions(-) rename src/Controller/{GuessController.php => GameController.php} (92%) rename views/{guess.php => game.php} (100%) diff --git a/public/index.php b/public/index.php index 45f4ab8..6f246a3 100644 --- a/public/index.php +++ b/public/index.php @@ -5,8 +5,8 @@ require '../main.php'; // very basic routing $url = $_SERVER['REQUEST_URI']; switch($url) { - case '/': - $controller = new MapGuesser\Controller\GuessController(); + case '/game': + $controller = new MapGuesser\Controller\GameController(); break; case '/getNewPosition.json': $controller = new MapGuesser\Controller\GetNewPosition(); diff --git a/src/Controller/GuessController.php b/src/Controller/GameController.php similarity index 92% rename from src/Controller/GuessController.php rename to src/Controller/GameController.php index 1b851ef..43230dd 100644 --- a/src/Controller/GuessController.php +++ b/src/Controller/GameController.php @@ -6,7 +6,7 @@ use MapGuesser\View\HtmlView; use MapGuesser\View\ViewBase; use mysqli; -class GuessController implements ControllerInterface +class GameController implements ControllerInterface { public function run(): ViewBase { @@ -30,6 +30,6 @@ class GuessController implements ControllerInterface $bounds = Bounds::createDirectly($map['bound_south_lat'], $map['bound_west_lng'], $map['bound_north_lat'], $map['bound_east_lng']); $data = compact('bounds'); - return new HtmlView('guess', $data); + return new HtmlView('game', $data); } } diff --git a/views/guess.php b/views/game.php similarity index 100% rename from views/guess.php rename to views/game.php