diff --git a/Chapter3/word_search.py b/Chapter3/word_search.py index c6a6085..9606c0f 100644 --- a/Chapter3/word_search.py +++ b/Chapter3/word_search.py @@ -55,7 +55,7 @@ def generate_domain(word: str, grid: Grid) -> List[List[GridLocation]]: # top to bottom domain.append([GridLocation(r, col) for r in rows]) # diagonal towards bottom left - if col - length >= 0: + if col + 1 - length >= 0: domain.append([GridLocation(r, col - (r - row)) for r in rows]) return domain