From 120e1c47276b7b9f503a49a1665ff6a7ac36dc06 Mon Sep 17 00:00:00 2001 From: Jonas Weinz Date: Tue, 3 Aug 2021 11:44:51 +0200 Subject: [PATCH] Modify solution word length --- server/crossword_generator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/crossword_generator.py b/server/crossword_generator.py index 198afe3..357c392 100644 --- a/server/crossword_generator.py +++ b/server/crossword_generator.py @@ -301,7 +301,7 @@ def create_word_grid(w: int, h: int, lang_code: str = "en", target_density: floa 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) # 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() logging.info("crossword generation done after %s iterations", str(i)) - return grid, word_hints, solution_word_locations + return grid, word_hints, solution_word_locations \ No newline at end of file