def test_available_moves_with_full_board(self): board = BaseBoard(3) board.board_state = {1:"o",2:"o",3:"x", 4:"x",5:"x",6:"o", 7:"o",8:"o",9:"x"} self.assertEqual([],board.available_moves())
def test_available_moves_with_win_board(self): board = BaseBoard(3) board.board_state = {1:"o",2:"o",3:"o"} # Board assumes available moves not called when game over self.assertEqual(range(4,10),board.available_moves())
def test_available_moves_with_partial_board(self): board = BaseBoard(3) board.board_state = {1:"x",5:"o"} self.assertEqual(range(2,5)+range(6,10),board.available_moves())