Modify solution word length

This commit is contained in:
Jonas Weinz 2021-08-03 11:44:51 +02:00
parent 04e82d0d60
commit 120e1c4727

View File

@ -301,7 +301,7 @@ def create_word_grid(w: int, h: int, lang_code: str = "en", target_density: floa
return None return None
def get_solution_word(min_length=15, max_length=100): def get_solution_word(min_length=12, max_length=100):
word = get_word(min_length=min_length, max_length=max_length) word = get_word(min_length=min_length, max_length=max_length)
# search for matching characters in locations # search for matching characters in locations
@ -371,4 +371,4 @@ def create_word_grid(w: int, h: int, lang_code: str = "en", target_density: floa
solution_word_locations = get_solution_word() solution_word_locations = get_solution_word()
logging.info("crossword generation done after %s iterations", str(i)) logging.info("crossword generation done after %s iterations", str(i))
return grid, word_hints, solution_word_locations return grid, word_hints, solution_word_locations