Exemple #1
0
 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]])
Exemple #2
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]])
Exemple #3
0
 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]])
Exemple #4
0
 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]])
Exemple #5
0
 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]])
Exemple #6
0
 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]])
Exemple #7
0
 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]])
Exemple #8
0
 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])