From: Simon Cross Date: Sat, 17 May 2014 22:45:38 +0000 (+0200) Subject: Fix skip_player implementation. X-Git-Tag: 0.1~10^2~12 X-Git-Url: https://git.ctpug.org.za/?p=naja.git;a=commitdiff_plain;h=5b8bd6cbb4e8fc7268b83a948c7d7808c1645370 Fix skip_player implementation. --- 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)]