MAPG-73 introduce map selection

unify CSS
This commit is contained in:
bence committed 2020-05-30 17:39:45 +02:00
1 parent 92c35a2087
commit 9ffedf6030
5 files changed
+275 -43

No files matched your search

+4 -1
View File
@@ -9,6 +9,9 @@ if (($pos = strpos($url, '?')) !== false) {
$url = substr($url, 0, $pos);
}
switch($url) {
case '/maps':
$controller = new MapGuesser\Controller\MapsController();
break;
case '/game':
$mapId = isset($_GET['map']) ? (int) $_GET['map'] : 0;
$controller = new MapGuesser\Controller\GameController($mapId);
@@ -22,7 +25,7 @@ switch($url) {
$controller = new MapGuesser\Controller\PositionController($mapId);
break;
case '/':
header('Location: ' . $host . '/game', true, 302);
header('Location: ' . $host . '/maps', true, 302);
die;
default:
echo 'Error 404';