summaryrefslogtreecommitdiff
path: root/game/states/play.js
diff options
context:
space:
mode:
Diffstat (limited to 'game/states/play.js')
-rw-r--r--game/states/play.js7
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;