projects
/
naja.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Shift board locations.
[naja.git]
/
naja
/
actions.py
diff --git
a/naja/actions.py
b/naja/actions.py
index f62b4637174621c3a29e541d4c445e4ece66f715..9c4e8f3fcc756973612cb4d60140bd7ed0114ed5 100644
(file)
--- a/
naja/actions.py
+++ b/
naja/actions.py
@@
-96,3
+96,11
@@
class GainHealthAndClearBitsOrMSB(LocationAction):
board.gain_health()
if not self.check_and_clear_MSB(board.player):
board.player.bits.clear_bits(location.bitwise_operand)
board.gain_health()
if not self.check_and_clear_MSB(board.player):
board.player.bits.clear_bits(location.bitwise_operand)
+
+
+class ShiftLocations(LocationAction):
+ # TODO: Direction parameter in TEXT.
+ TEXT = "Shift board locations."
+
+ def perform_action(self, board, location):
+ board.shift_locations(self.data['direction'])