Shift board locations.
[naja.git] / naja / actions.py
index f62b4637174621c3a29e541d4c445e4ece66f715..9c4e8f3fcc756973612cb4d60140bd7ed0114ed5 100644 (file)
@@ -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)
+
+
+class ShiftLocations(LocationAction):
+    # TODO: Direction parameter in TEXT.
+    TEXT = "Shift board locations."
+
+    def perform_action(self, board, location):
+        board.shift_locations(self.data['direction'])