From 8c0a371916effa25ac77dc8a3420b95bd8b7a173 Mon Sep 17 00:00:00 2001 From: Justin Worthe Date: Sat, 23 Aug 2014 12:18:34 +0200 Subject: Changed turn changing to only happen at the end of a players movement --- game/states/play.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'game/states/play.js') 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) { -- cgit v1.2.3