diff options
author | Justin Worthe <justin.worthe@gmail.com> | 2014-08-23 12:18:34 +0200 |
---|---|---|
committer | Justin Worthe <justin.worthe@gmail.com> | 2014-08-23 12:18:34 +0200 |
commit | 8c0a371916effa25ac77dc8a3420b95bd8b7a173 (patch) | |
tree | 8c0b17293d4289645da5a3399f36a811e698a1fd /game/states/play.js | |
parent | 9f30e7581f4f4ea5aea06467daca3083f60e4714 (diff) |
Changed turn changing to only happen at the end of a players movement
Diffstat (limited to 'game/states/play.js')
-rw-r--r-- | game/states/play.js | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/game/states/play.js b/game/states/play.js index 1b59596..7ffcc3d 100644 --- a/game/states/play.js +++ b/game/states/play.js @@ -210,8 +210,7 @@ Play.prototype = { var newY = player.y + deltaY; if (!this.checkMap(newX, newY) && player.isMyTurn && !player.moving) { - player.move(newX, newY); - this.togglePlayerTurn(); + player.move(newX, newY, this.togglePlayerTurn, this); } }, playerPillCollision: function(player, pill) { |