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,)
class AllowChessMoveIfMSB(LocationAction):
- TEXT = "Clear {MSB} and move like a %(chesspiece_name)s for one turn."
+ TEXT = (
+ "Clear {MSB} and move like a %(chesspiece_name)s for one turn if it "
+ "was set.")
MSB_GLYPH = ACTION_GLYPHS.MOVEMENT
def perform_action(self, board, location):