Skip to content

Commit

Permalink
Completed crossword editor
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasvana10 committed Jun 25, 2024
1 parent 4a5f450 commit 05679f0
Show file tree
Hide file tree
Showing 5 changed files with 413 additions and 89 deletions.
8 changes: 4 additions & 4 deletions crossword_puzzle/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ def _route(
All class instances that use ``_route`` must have their content packed
and contain 4 content generation methods, as seen below.
"""
if kwargs: # The caller of this route has added arguments for confirmation
if not self._confirm_route(**kwargs):
return False # User didn't want to route

try:
page_inst = locals()[page_ref](base)
except KeyError:
Expand All @@ -75,10 +79,6 @@ def _route(

page_inst = locals()[page_ref](base)

if kwargs: # The caller of this route has added arguments for confirmation
if not self._confirm_route(**kwargs):
return False # User didn't want to route

for widget in Base.base_container.winfo_children(): # Remove content
widget.pack_forget()

Expand Down
2 changes: 1 addition & 1 deletion crossword_puzzle/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class Dark:
ACROSS: str = "ACROSS"
DOWN: str = "DOWN"
EMPTY: str = "\u25AE"
KEEP_LANGUAGES_PATTERN: Pattern = compile(r"\PL")
NONLANGUAGE_PATTERN: Pattern = compile(r"\PL")
QUALITY_MAP: Dict[str, int] = {
"terrible": 0.05,
"poor": 0.25,
Expand Down
Loading

0 comments on commit 05679f0

Please sign in to comment.