from unittest import TestCase
-from naja.constants import BITS, MOVES, EXAMINE
+from naja.constants import BITS, MOVES
from naja.gameboard import GameBoard, LocationCard
from naja.options import parse_args
from naja import actions
exported_state = board.export()
board_locations = exported_state.pop('board_locations')
self.assertEqual(exported_state, {
+ 'clock_count': 0,
'max_health': 4,
'health': 4,
'wins_required': 4,
]}],
'player': board.player.export(),
'puzzle': False,
- 'player_mode': EXAMINE,
'replacement_params': None,
- 'clock_count': 0,
})
positions = []
for position, location_state in board_locations:
self.assertEqual(type(action), actions.DoNothing)
self.assertEqual(action.required_bits, set())
self.assertEqual(location.replacement_time, None)
-
- def test_parse_bits(self):
- self.assertEqual(
- LocationCard.parse_bits([]), frozenset([]))
- self.assertEqual(
- LocationCard.parse_bits(['RED']), frozenset([BITS.RED]))
- self.assertEqual(
- LocationCard.parse_bits([BITS.BLUE]), frozenset([BITS.BLUE]))
- self.assertEqual(
- LocationCard.parse_bits([BITS.NORTH, 'MSB']),
- frozenset([BITS.NORTH, BITS.MSB]))