genxword
genxword copied to clipboard
The wordlist is sorted in reverse
Thanks for this great library!
I noticed that the cli version does not react to my request of generating smaller grid sizes. After some digging, I realized that the word list is sorted from longest to shortest, which means that the following line in check_grid_size
is False
even if it shouldn't:
if len(self.wordlist[0][0]) < min(nrow, ncol):
This can easily be fixed by changing
self.wordlist.sort(key=lambda i: len(i[0]), reverse=True)
to
self.wordlist.sort(key=lambda i: len(i[0]), reverse=False)