Fix skip_player implementation.
authorSimon Cross <hodgestar@gmail.com>
Sat, 17 May 2014 22:45:38 +0000 (00:45 +0200)
committerSimon Cross <hodgestar@gmail.com>
Sat, 17 May 2014 22:45:47 +0000 (00:45 +0200)
naja/actions.py
naja/gameboard.py

index 431b126829a1d48b401fdb5e3e288c5406a9a0dc..07d9d0a14bc86dc3cecefbf4e8c1b3f383563629 100644 (file)
@@ -295,7 +295,7 @@ class ShiftLocations(LocationAction):
         sound.play_sound('grind.ogg')
         board.shift_locations(
             self.data['direction'],
-            self.data.get('skip_player', False))
+            self.data.get('skip_current', True))
 
 
 class RotateLocations(LocationAction):
index f17a129742fb810cc91055cc24d68a2efcfb065e..894f2b31f052b1464a6cdb1876187a5aefc8d55c 100644 (file)
@@ -215,7 +215,7 @@ class GameBoard(object):
             if skip_player and (px, py) == mkpos(i):
                 continue
             new_i = (i + change) % 5
-            if (px, py) == mkpos(new_i):
+            if skip_player and (px, py) == mkpos(new_i):
                 new_i = (new_i + change) % 5
             shifted_locations[mkpos(new_i)] = self.board_locations[mkpos(i)]