MAPG-4 rename GuessController to GameController
This commit is contained in:
parent
5c9b54c881
commit
dc943fa3cb
@ -5,8 +5,8 @@ require '../main.php';
|
|||||||
// very basic routing
|
// very basic routing
|
||||||
$url = $_SERVER['REQUEST_URI'];
|
$url = $_SERVER['REQUEST_URI'];
|
||||||
switch($url) {
|
switch($url) {
|
||||||
case '/':
|
case '/game':
|
||||||
$controller = new MapGuesser\Controller\GuessController();
|
$controller = new MapGuesser\Controller\GameController();
|
||||||
break;
|
break;
|
||||||
case '/getNewPosition.json':
|
case '/getNewPosition.json':
|
||||||
$controller = new MapGuesser\Controller\GetNewPosition();
|
$controller = new MapGuesser\Controller\GetNewPosition();
|
||||||
|
@ -6,7 +6,7 @@ use MapGuesser\View\HtmlView;
|
|||||||
use MapGuesser\View\ViewBase;
|
use MapGuesser\View\ViewBase;
|
||||||
use mysqli;
|
use mysqli;
|
||||||
|
|
||||||
class GuessController implements ControllerInterface
|
class GameController implements ControllerInterface
|
||||||
{
|
{
|
||||||
public function run(): ViewBase
|
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']);
|
$bounds = Bounds::createDirectly($map['bound_south_lat'], $map['bound_west_lng'], $map['bound_north_lat'], $map['bound_east_lng']);
|
||||||
|
|
||||||
$data = compact('bounds');
|
$data = compact('bounds');
|
||||||
return new HtmlView('guess', $data);
|
return new HtmlView('game', $data);
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user