Carl Worth [Tue, 19 Dec 2006 16:52:03 +0000 (08:52 -0800)]
Remove penalty for not guessing obscure words.
The list of obscure words is in obscure.txt. It consists of words
that are also in words.txt, but for which blanks lines will not
appear on the game board. If an obscure word is guessed, it will
still be considered valid---a new space for it will be inserted
into the game board and the word will be displayed in green.
Many thanks to Kevin Atkinson and Alan Beale for providing the
2of12inf.txt list from which an attempt at identifying 'obscure'
words in OWL2+LWL could be identified. The 2of12inf.tx list was
obtained from:
Carl Worth [Tue, 19 Dec 2006 15:57:34 +0000 (07:57 -0800)]
dict: Fix bug in for_each iterations with no max_length limit
We've been using an idiom of min_length == 0, max_length == 0 to
indicate no length limit, but this has apparently been broken since
the rework of the for_each interfaces that introduced this.
Carl Worth [Tue, 19 Dec 2006 07:41:26 +0000 (23:41 -0800)]
Fix to not give hints by putting answers found so far in their alphabetical position.
Instead all found answers now appear alphabetically before the blanks
corresponding to all unfound answers.
Part of implementing this was adding new of_length interfaces to dict
in place (or in addition) to the previous by_length interfaces. The
new interfaces are much more useful, (allowing length-limited queries
without any implicit looping).
Carl Worth [Tue, 19 Dec 2006 06:34:55 +0000 (22:34 -0800)]
Allow a new game to be started by pressing Enter after Control-C
This took a fair amount of refactoring, but things are generally much
cleaner now, (even if the rack_t structure has long since outgrown its
name---it should be game_t now or so).
Carl Worth [Sat, 16 Dec 2006 23:52:37 +0000 (15:52 -0800)]
Abstract tile-specific code out of demo-item.c
We now accomplish painting by simply passing in a callback
function to do the painting. This will allow the single item
class to be shared for all canvas items.
Carl Worth [Tue, 5 Dec 2006 06:46:53 +0000 (22:46 -0800)]
Fix randomizing of letter positions to never end up on top of each other
We had some confusion over who was in charge of the letter position,
(whether the matrix as manipulated by the core animate code, or
whether private fields in our demo-item structure). We now do all
positioning based on the matrix. As a regression, animation is now
disabled.
Carl Worth [Thu, 21 Sep 2006 09:02:39 +0000 (02:02 -0700)]
Move private portions of dict from dict-impl.h back to dict.c
This is the punch line in the recent series of commits which removed
trie_t and string_t code from grid.c. We now finally have a nice,
clean dict_t interface for new programs to use.
Carl Worth [Thu, 21 Sep 2006 07:36:10 +0000 (00:36 -0700)]
Complete the dict layer by adding dict_cursor_t and dict_entry_t
Some might argue that this is a gratuitous layer and that it
hides the elegance of the trie implementation where pointers
to the entire structure and pointers to a single node are
equivalent.
But I think the elegance is still all there in the implementation,
and I think there's some real benefit in making separate notions
of the entire structure (dict_t) and a pointer to a single element
for navigating (dict_cursor_t) since the operations one might want
to perform on one or the other are entirely separate.
With this change, the only remaining dependence of grid.c on any
trie or TRIE symbols is a single flag definition (which I want to
put entirely in grid.c) and the print functionality.