jonadsimon / wonder-words-generator

Generates WonderWords puzzles
Apache License 2.0
2 stars 0 forks source link

Fix bug with covered-up-word logic #47

Closed jonadsimon closed 2 years ago

jonadsimon commented 2 years ago

words "rain" and "lush" are 100% covered in the below puzzle

horizontal (fwd/bwd): 10/7
vertical (fwd/bwd): 16/3
diagonal du (fwd/bwd): 0/3
diagonal ud (fwd/bwd): 2/10

Topic:  sunny / outdoors

Q U I E T N E V E N U E C W A
H A Z Y W O N S L A W N O A F
D E Y Y R N R T N Y R O O R A
I N G D G T A O S E Z E L M U
G E G A U G N M O I D E I G N
I R O M L O U I U D O R E R A
R E F P O O L M W H N M A R D
F S A D A N A C D I N I N G B
L U S H G M H O H T N E T R A
O N U A U I P L S E D D I O L
R L N L L S A D K A E G Y O M
A I N L C T T E I R H R O M Y
L T Y S H Y I R E T E O Y S P
O D I M U H O L S H I N E P O
D M O R A L G L A R E D A H S

aglow   balmy   breezy   bright   canada   cheery   chilly   cloudy   colder   cool   damp   dining   drier   earth   event   fauna   flora   foggy   frigid   garden   glare   gulch   halls   hazy   human   humid   indoor   lawn   lush   misty   moist   moral   muggy   open   patio   pool   quiet   rain   rooms   serene   shade   shine   skies   snowy   sunlit   sunny   tent   venue   warm   windy   wintry

Why weren't these caught by the checks??

Should simply add an asterisk to such words rather than remove from word list. Tightly-packed puzzles have too many issues here.

Simplify the logic in the find_word_in_board/find_words_in_board functions

jonadsimon commented 2 years ago

Fixed in https://github.com/jonadsimon/wonder-words-generator/commit/e20a25ec2a180f2f35865bd7e1169911243e33c8