From 90cf8e0e0006bd9258f6100fcdf2312363543815 Mon Sep 17 00:00:00 2001 From: Stefano Rivera Date: Sat, 17 May 2014 19:42:43 +0200 Subject: [PATCH] ClearBits action --- naja/actions.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/naja/actions.py b/naja/actions.py index c96a219..dc8f3e6 100644 --- a/naja/actions.py +++ b/naja/actions.py @@ -98,6 +98,14 @@ class SetBits(LocationAction): board.player.bits.set_bits(location.bitwise_operand) +class ClearBits(LocationAction): + TEXT = "Clear %(location_bits)s." + GLYPHS = (ACTION_GLYPHS.CLEAR_BITS,) + + def perform_action(self, board, location): + board.player.bits.clear_bits(location.bitwise_operand) + + class ToggleBits(LocationAction): TEXT = "Toggle %(location_bits)s." GLYPHS = (ACTION_GLYPHS.TOGGLE_BITS,) -- 2.34.1