def test_not_in_board(self): """ If a word is not available in the board, False is returned. """ board = Board(rows=[ ['A', 'C', 'B'], ]) self.assertFalse(board.is_available_route(word=['A', 'B', 'C']))
def test_route(self): """ If there is a route between each letter, True is returned. """ board = Board(rows=[ ['A', 'B', 'C'], ]) self.assertTrue(board.is_available_route(word=['A', 'B', 'C']))
def test_repeated_tile_contents(self): """ A route which uses the different tiles is valid, even if the contents of some of those tiles are the same. """ board = Board(rows=[ ['A', 'A', 'A'], ]) self.assertTrue(board.is_available_route(word=['A', 'A', 'A']))
def test_repeated_tile(self): """ A route which uses the same tile multiple times is not valid, so if this is the only available route, False is returned. """ board = Board(rows=[ ['A', 'B'], ]) self.assertFalse(board.is_available_route(word=['A', 'B', 'A']))