summaryrefslogtreecommitdiff
path: root/game/states/play.js
diff options
context:
space:
mode:
authorJustin Worthe <justin.worthe@entelect.co.za>2014-07-17 10:02:26 +0200
committerJustin Worthe <justin.worthe@entelect.co.za>2014-07-17 10:02:26 +0200
commit3f9df8f49cc84d77f585b77cbc9ac7c20478d406 (patch)
tree8e977eeb07f30d9e2dd75f7f896d41fc95dc0943 /game/states/play.js
parent83d3c7bac60e8c838c4a779fde7d8ff6c8a7cc90 (diff)
Fixed bug in player movement
Diffstat (limited to 'game/states/play.js')
-rw-r--r--game/states/play.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/game/states/play.js b/game/states/play.js
index 104c322..e3009a5 100644
--- a/game/states/play.js
+++ b/game/states/play.js
@@ -182,7 +182,7 @@ Play.prototype = {
var newX = player.x + deltaX;
var newY = player.y + deltaY;
- if (!this.checkMap(newX, newY) && player.isMyTurn) {
+ if (!this.checkMap(newX, newY) && player.isMyTurn && !player.moving) {
player.move(newX, newY);
this.togglePlayerTurn();
}