check_available(set([BITS.MSB]), [], False)
check_available(set([BITS.MSB]), [BITS.MSB], True)
+ def test_bits_translation(self):
+ action = actions.LocationAction(set([BITS.NORTH, 'MSB']))
+ self.assertEqual(action.required_bits, set([BITS.NORTH, BITS.MSB]))
+
def test_DoNothing(self):
board = self.make_board()
state_before = board.export()
def test_LoseHealthOrMSB_MSB_clear(self):
board = self.make_board()
state_before = board.export()
- actions.LoseHeathOrMSB(set()).perform_action(board, None)
+ actions.LoseHealthOrMSB(set()).perform_action(board, None)
state_after = board.export()
self.assertEqual(state_after['health'], state_before['health'] - 1)
def test_LoseHealthOrMSB_MSB_set(self):
board = self.make_board(player_bits=[BITS.MSB])
state_before = board.export()
- actions.LoseHeathOrMSB(set()).perform_action(board, None)
+ actions.LoseHealthOrMSB(set()).perform_action(board, None)
state_after = board.export()
self.assertEqual(board.player.bits.check_bit(BITS.MSB), False)