jonadsimon / wonder-words-generator

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

Fix logic to deal with "NOON" #43

Closed jonadsimon closed 2 years ago

jonadsimon commented 2 years ago

Pretty sure there were two conflicting bugs: 1) double-up-words vs covered-up-words got flipped 2) edge-case where double-up-words overcounts palindromes

Fixed (1), therefore expect script to always fail with "double-up-words found"

Need to update the location-counting logic so it only counts along each axis once. Will need to do it as a second-pass that wipes out duplicate occurrences (?)

Screenshot of failure; produced by command python make_puzzle_v2.py monday work job --packing_constant=1.2 --strategy=median

words are completely covered-up and will be removed from the displayed list: noon

Topic:  monday / work / job

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

apply   berth   book   bring   bull   came   caper   cheat   chore   craft   crop   days   deal   diel   dusk   duty   even   forge   form   game   held   help   hero   hire   isha   knead   labor   land   last   late   lick   line   make   mold   money   moon   morn   mould   night   place   play   plow   post   shape   solve   sour   sport   spot   stint   study   task   today   toil   trade   turn   wash   week   what   work   wreak
jonadsimon commented 2 years ago

Also doubling-up retry logic is broken so words don't get reshuffled and/or reprinted

jonadsimon commented 2 years ago

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