crossword-generator icon indicating copy to clipboard operation
crossword-generator copied to clipboard

Getting error with a specific set of words

Open hazem-taha opened this issue 3 years ago • 5 comments

Please check the below screenshot..

image

Please help, thanks

hazem-taha avatar Sep 13 '21 08:09 hazem-taha

I have the problem too, give you a resolve,find src/demo.js,line 21-22,add ‘px’ at last。and find line45-46, add ‘px’ too, your problem will reslove

kivenZhou avatar Sep 18 '21 04:09 kivenZhou

@kivenZhou Thank you, I tried but still did not solve..

hazem-taha avatar Sep 18 '21 16:09 hazem-taha

@hazem-taha Seems like the question raised in your screenshot could not be solved by these code. In this special case, word KITTEN could not be inserted, so the code ran wrong. After delete the word KITTEN, it works again.

gaoryrt avatar Oct 09 '21 06:10 gaoryrt

hello @gaoryrt

Yes exactly this is the case, but how to fix this ? as I don't have control on the words the user enters to create the puzzle and this is a bug behavior as far as I understand..

Thanks in advance.

hazem-taha avatar Oct 10 '21 11:10 hazem-taha

@hazem-taha To ensure that the input has a solution, the code first sorts the input by word's length You can try to replace this part using the user-input order As long as the user ensures that the order of the inputs have a solution, the code will have one too This is the easiest way I can think of

gaoryrt avatar Oct 11 '21 08:10 gaoryrt