def test_word_coordinates_found_ascending_diagonally_up(self): file = word_search.WordFinder().search_for_words_by_first_letter_index('puzzle1.txt') self.assertEqual(file['LEARNING'], [[4, 7], [5, 6], [6, 5], [7, 4], [8, 3], [9, 2], [10, 1], [11, 0]])
def test_word_coordinates_found_ascending_diagonally_down(self): file = word_search.WordFinder().search_for_words_by_first_letter_index('puzzle0.txt') self.assertEqual(file['SPOCK'], [[2,1],[3,2],[4,3],[5,4],[6,5]])
def test_word_coordinates_found_descending_diagonally_down(self): file = word_search.WordFinder().search_for_words_by_first_letter_index('puzzle0.txt') self.assertEqual(file['UHURA'], [[4, 0], [3, 1], [2, 2], [1, 3], [0, 4]])
def test_word_coordinates_found_descending_horizontally(self): file = word_search.WordFinder().search_for_words_by_first_letter_index('puzzle0.txt') self.assertEqual(file['KIRK'], [[4, 7],[3, 7],[2, 7],[1, 7]])
def test_word_coordinates_found_ascending_horizontally(self): file = word_search.WordFinder().search_for_words_by_first_letter_index('puzzle0.txt') self.assertEqual(file['SCOTTY'], [[0,5], [1,5], [2,5], [3,5], [4,5], [5,5]])
def test_word_coordinates_found_ascending_vertically(self): file = word_search.WordFinder().search_for_words_by_first_letter_index('puzzle0.txt') self.assertEqual(file['KHAN'], [[5,9], [5,8], [5,7], [5,6]])
def test_word_coordinates_found_descending_vertically(self): file = word_search.WordFinder().search_for_words_by_first_letter_index('puzzle0.txt') self.assertEqual(file['BONES'], [[0,6], [0,7], [0,8], [0,9], [0,10]])
def test_find_index_of_first_letter_of_first_word_on_puzzle_board(self): file = word_search.WordFinder().search_for_words_by_first_letter_index('puzzle0.txt') self.assertEqual(file['BONES'][0], [0,6])