From 03db6e5aec4ef0e92b5e26de32780e6f6c8e9a86 Mon Sep 17 00:00:00 2001 From: Ivor Barhansky Date: Sun, 20 Feb 2022 23:07:58 +0000 Subject: [PATCH] =?UTF-8?q?=D0=97=D0=B0=D0=B3=D1=80=D1=83=D0=B7=D0=B8?= =?UTF-8?q?=D0=BB(=D0=B0)=20=D1=84=D0=B0=D0=B9=D0=BB=D1=8B=20=D0=B2=20'pub?= =?UTF-8?q?lic'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ivor Barhansky --- public/index.php | 74 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 public/index.php diff --git a/public/index.php b/public/index.php new file mode 100644 index 0000000..3acabb5 --- /dev/null +++ b/public/index.php @@ -0,0 +1,74 @@ +goUp(); +} +if ($_POST['action'] === 'down') { + $map->goDown(); +} +if ($_POST['action'] === 'left') { + $map->goLeft(); +} +if ($_POST['action'] === 'right') { + $map->goRight(); +} +if ($_POST['action'] === 'clear') { + Player::clear(); +} + +/** Для отладки. */ +?> +
+ P:[,] MAP:[]
+ Смена локаций на MAP:[0,2] и MAP2:[4,2]. Да, там надо повторно клацнуть чтобы всё сменилось, но опять же, это + принцип на коленке, а не готовое решение. Если хранить всё хоть в какой-то базе, а не в сессиях от половины этих + костылей можно отказаться. +
+drawVisible(); +require_once '../resources/views/map-controls.html'; + +echo 'Карта целиком:

'; +MapData::drawFullMap();