From a85cf3a47f4a11c40c5e469eff485d1e09fad4f7 Mon Sep 17 00:00:00 2001 From: Ugo Date: Wed, 16 Oct 2019 22:51:49 +0200 Subject: [PATCH] implemented Wall --- index.html | 6 +++--- js/rl.js | 34 +++++++++++++++++++++------------- js/view.js | 7 +++++++ 3 files changed, 31 insertions(+), 16 deletions(-) diff --git a/index.html b/index.html index da352ca..1348449 100644 --- a/index.html +++ b/index.html @@ -41,11 +41,11 @@ diff --git a/js/rl.js b/js/rl.js index e423602..6ee35a5 100644 --- a/js/rl.js +++ b/js/rl.js @@ -87,9 +87,10 @@ function choose(array) { // ------------------ maze stuff -------------------------------------------- const tile = { regular: 0, - start: 1, - end: 2, + wall: 1, + start: 2, dangerous: 4, + end: 8, }; const dir = { @@ -124,22 +125,29 @@ class Maze { get_actions() { var actions = []; for (let idy=0; idy