def test_four_corners(self): corners = Board(Game()).corners() self.assertEqual(len(corners), 4)
def test_nine_board_positions_by_default(self): game = Game() board = Board(game) self.assertEqual(len(board.positions()), 9)
def test_board_positions_are_lists(self): # they're not tuples because I have a dream of sending game states # back and forth as JSON positions = Board(Game()).positions() for position in positions: self.assertIsInstance(position, list)
def setUp(self): self.game = Game() self.subject = ThroughLine(self.game) self.board_size = Board(self.game).get_size()
def setUp(self): self.b = Board()
def calculate_board_state_label(num: str) -> Board: _board_state = bin(num)[2:].zfill(18) return Board(_board_state)
def test_position_not_occupied_before_moving(self): game = Game() moves = Moves(game) board = Board(game) for position in board.positions(): assert not moves.is_occupied(position)