Skip to content

The wordlist is sorted in reverse #30

@anianruoss

Description

@anianruoss

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions