From 5b8bd6cbb4e8fc7268b83a948c7d7808c1645370 Mon Sep 17 00:00:00 2001 From: Simon Cross Date: Sun, 18 May 2014 00:45:38 +0200 Subject: [PATCH] Fix skip_player implementation. --- naja/actions.py | 2 +- naja/gameboard.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/naja/actions.py b/naja/actions.py index 431b126..07d9d0a 100644 --- a/naja/actions.py +++ b/naja/actions.py @@ -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): diff --git a/naja/gameboard.py b/naja/gameboard.py index f17a129..894f2b3 100644 --- a/naja/gameboard.py +++ b/naja/gameboard.py @@ -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)] -- 2.34.1