diff options
author | Justin Worthe <justin.worthe@gmail.com> | 2014-08-27 08:12:55 +0200 |
---|---|---|
committer | Justin Worthe <justin.worthe@gmail.com> | 2014-08-27 08:12:55 +0200 |
commit | 8d9e59e1d3addfcbeab2a00796e5e2da3ff0a608 (patch) | |
tree | 98ef0cf23fe11a1cf0609896cbf87fa1409d902f /game/states/play.js | |
parent | d188dc926f956a856f391889bfa135de08ba4027 (diff) |
Added visual indication of player ready to place poison pill
Diffstat (limited to 'game/states/play.js')
-rw-r--r-- | game/states/play.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/game/states/play.js b/game/states/play.js index ec0ddae..15304d5 100644 --- a/game/states/play.js +++ b/game/states/play.js @@ -262,6 +262,9 @@ Play.prototype = { var newX = player.x + deltaX; var newY = player.y + deltaY; var placePoisonPill = player.hasPoisonPill && player.poisonPillActive; + if (this.checkMap(newX, newY) || !player.isMyTurn || player.moving) { + return; + } var posionPillX = player.x; var posionPillY = player.y; @@ -269,9 +272,7 @@ Play.prototype = { player.hasPoisonPill = false; } - if (this.checkMap(newX, newY) || !player.isMyTurn || player.moving) { - return; - } + var intermediateX = newX; var teleportX = newX; |