little adjustments

This commit is contained in:
Jonas Weinz 2021-08-31 17:43:09 +02:00
parent ff5cbafe2b
commit dc07f825b0
2 changed files with 10 additions and 3 deletions

View File

@ -812,8 +812,8 @@ def create_word_grid(w: int,
words = list(db.keys()) words = list(db.keys())
n_words = len(words) n_words = len(words)
min_solution_length = 10 min_solution_length = 12
max_solution_length = 20 max_solution_length = 30
solution_word_locations = None solution_word_locations = None

View File

@ -46,7 +46,14 @@ class Session(object):
def get_crossword(self, lang: str = "en", difficulty: int = 0) -> crossword.Crossword: def get_crossword(self, lang: str = "en", difficulty: int = 0) -> crossword.Crossword:
if self.crossword is None: if self.crossword is None:
self.create_crossword(lang=lang, difficulty=difficulty) size = 20
if difficulty == 0:
size = 15
if difficulty == 1:
size = 20
if difficulty == 2:
size = 30
self.create_crossword(width = size, height = size, lang=lang, difficulty=difficulty)
return self.crossword return self.crossword