Improve word suggestion algorithm
Description
This MR adds find_possible_words (clue, grid, word_list). This function returns an array of possible words for a given clue. The word suggestion list now uses this function to get a list of possible words, instead of the word_list_find_intersection.
Overview of changes
-
word-suggestion.c- Added
find_possible_words ().
- Added
-
word-suggestion-tests.c- Added basic tests for
find_possible_words (). - Added IPUZ files for the tests, in
src/tests/word-suggestion.
- Added basic tests for
-
edit-word-list.c- We don't need to keep track of the filter strings and offsets anymore, because
find_possible_wordsdoesn't need those. So I removed all the code related to those. - We do need to keep track of the current clue and direction, because
find_possible_wordsneeds those. So I added code for that. - I moved
calculate_clue_word_posintoword-list-misc.edit-word-list.cdoesn't use that function anymore, butword-suggestion.cdoes.
- We don't need to keep track of the filter strings and offsets anymore, because
-
word-list-misc.c- Added
WordSet, a typedef ofGHashTable. - Added functions for
WordSet.
- Added