@@ -69,12 +69,12 @@ def insert_north(self, word: str, rows: list[int], cols: list[int]) -> None:
69
69
def insert_northeast (self , word : str , rows : list [int ], cols : list [int ]) -> None :
70
70
"""
71
71
>>> ws = WordSearch(WORDS, 3, 3)
72
- >>> ws.insert_north_east ("cat", [2], [0])
72
+ >>> ws.insert_northeast ("cat", [2], [0])
73
73
>>> ws.board # doctest: +NORMALIZE_WHITESPACE
74
74
[[None, None, 't'],
75
75
[None, 'a', None],
76
76
['c', None, None]]
77
- >>> ws.insert_north_east ("at", [0, 1], [2, 1, 0])
77
+ >>> ws.insert_northeast ("at", [0, 1], [2, 1, 0])
78
78
>>> ws.board # doctest: +NORMALIZE_WHITESPACE
79
79
[[None, 't', 't'],
80
80
['a', 'a', None],
@@ -139,12 +139,12 @@ def insert_east(self, word: str, rows: list[int], cols: list[int]) -> None:
139
139
def insert_southeast (self , word : str , rows : list [int ], cols : list [int ]) -> None :
140
140
"""
141
141
>>> ws = WordSearch(WORDS, 3, 3)
142
- >>> ws.insert_south_east ("cat", [0], [0])
142
+ >>> ws.insert_southeast ("cat", [0], [0])
143
143
>>> ws.board # doctest: +NORMALIZE_WHITESPACE
144
144
[['c', None, None],
145
145
[None, 'a', None],
146
146
[None, None, 't']]
147
- >>> ws.insert_south_east ("at", [1, 0], [2, 1, 0])
147
+ >>> ws.insert_southeast ("at", [1, 0], [2, 1, 0])
148
148
>>> ws.board # doctest: +NORMALIZE_WHITESPACE
149
149
[['c', None, None],
150
150
['a', 'a', None],
@@ -209,12 +209,12 @@ def insert_south(self, word: str, rows: list[int], cols: list[int]) -> None:
209
209
def insert_southwest (self , word : str , rows : list [int ], cols : list [int ]) -> None :
210
210
"""
211
211
>>> ws = WordSearch(WORDS, 3, 3)
212
- >>> ws.insert_south_west ("cat", [0], [2])
212
+ >>> ws.insert_southwest ("cat", [0], [2])
213
213
>>> ws.board # doctest: +NORMALIZE_WHITESPACE
214
214
[[None, None, 'c'],
215
215
[None, 'a', None],
216
216
['t', None, None]]
217
- >>> ws.insert_south_west ("at", [1, 2], [2, 1, 0])
217
+ >>> ws.insert_southwest ("at", [1, 2], [2, 1, 0])
218
218
>>> ws.board # doctest: +NORMALIZE_WHITESPACE
219
219
[[None, None, 'c'],
220
220
[None, 'a', 'a'],
@@ -279,12 +279,12 @@ def insert_west(self, word: str, rows: list[int], cols: list[int]) -> None:
279
279
def insert_northwest (self , word : str , rows : list [int ], cols : list [int ]) -> None :
280
280
"""
281
281
>>> ws = WordSearch(WORDS, 3, 3)
282
- >>> ws.insert_north_west ("cat", [2], [2])
282
+ >>> ws.insert_northwest ("cat", [2], [2])
283
283
>>> ws.board # doctest: +NORMALIZE_WHITESPACE
284
284
[['t', None, None],
285
285
[None, 'a', None],
286
286
[None, None, 'c']]
287
- >>> ws.insert_north_west ("at", [1, 2], [0, 1])
287
+ >>> ws.insert_northwest ("at", [1, 2], [0, 1])
288
288
>>> ws.board # doctest: +NORMALIZE_WHITESPACE
289
289
[['t', None, None],
290
290
['t', 'a', None],
@@ -326,12 +326,13 @@ def generate_board(self) -> None:
326
326
"""
327
327
directions = (
328
328
self .insert_north ,
329
- self .insert_north_east ,
329
+ self .insert_northeast ,
330
330
self .insert_east ,
331
- self .insert_south_east ,
331
+ self .insert_southeast ,
332
332
self .insert_south ,
333
- self .insert_south_west ,
333
+ self .insert_southwest ,
334
334
self .insert_west ,
335
+ self .insert_northwest ,
335
336
)
336
337
for word in self .words :
337
338
# Shuffle the row order and column order that is used when brute forcing
@@ -359,7 +360,7 @@ def visualise_word_search(
359
360
# # # # t
360
361
# # # # a
361
362
# # # # c
362
- >>> ws.insert_north_east ("snake", [4], [4, 3, 2, 1, 0])
363
+ >>> ws.insert_northeast ("snake", [4], [4, 3, 2, 1, 0])
363
364
>>> visualise_word_search(
364
365
... ws.board, add_fake_chars=False) # doctest: +NORMALIZE_WHITESPACE
365
366
# # # # e
0 commit comments