def test_empty_spaces_full(): """Check that the correct number of empty spaces are returned for a full board. """ n = 4 board = Board(size=n) board.board_2d = np.ones(board.board_2d.shape) empty_spaces = board.get_empty_spaces() assert len(empty_spaces) == 0
def test_has_legal_moves_none(): """Check the function correctly returns that there are no legal moves when the board is full. """ n = 4 board = Board(size=n) # Populate the board with stones of Colour 1 board.board_2d = np.ones(board.board_2d.shape) assert not board.has_legal_moves()