summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Worthe <justin.worthe@gmail.com>2014-09-01 07:55:06 +0200
committerJustin Worthe <justin.worthe@gmail.com>2014-09-01 07:55:06 +0200
commitb127c30374c2dcc283e37fa3038b8de2316cad73 (patch)
tree057d071cf1abb23d87e73e8d23b82e85c82c2242
parenta3a11ded6b2e1febf0416aaecfc393c7626ccdac (diff)
Added invisible walls to prevent stupid moves after respawn
-rw-r--r--assets/levels/maze.lvl2
-rw-r--r--game/states/play.js5
-rw-r--r--todo.md2
3 files changed, 6 insertions, 3 deletions
diff --git a/assets/levels/maze.lvl b/assets/levels/maze.lvl
index e2d2a3e..bbdfc9d 100644
--- a/assets/levels/maze.lvl
+++ b/assets/levels/maze.lvl
@@ -8,7 +8,7 @@
####.###.#.###.####
####.#.......#.####
####.#.## ##.#.####
- B...# #...A
+ B...#| |#...A
####.#.## ##.#.####
####.#.......#.####
####.#.#####.#.####
diff --git a/game/states/play.js b/game/states/play.js
index 14d8335..617176d 100644
--- a/game/states/play.js
+++ b/game/states/play.js
@@ -189,7 +189,10 @@ Play.prototype = {
this.playerB = new Player(this.game, x, y, 'player-b', 0, 'nomSound');
this.players.add(this.playerB);
break;
- }
+ case '|':
+ this.addToMap(x, y);
+ break;
+ }
}
}
diff --git a/todo.md b/todo.md
index a090944..93f09d7 100644
--- a/todo.md
+++ b/todo.md
@@ -2,7 +2,7 @@ TODO
====
* Add restrictions on movement into the center
- 3. Cannot move out of center and eat opponent.
+ 3. Cannot move out of center and eat opponent
4. Cannot drop poison pill in the middle
* Add tutorial / instructions page
* Add reset / end game early mechanism