]> git.cworth.org Git - wordgame/blobdiff - grid.c
Eliminate useless layer of dict wrapping trie.
[wordgame] / grid.c
diff --git a/grid.c b/grid.c
index 78c6c56d1370564c5165541a37f5be2192346174..c7858080b1fa84d473392b000f9d1fbb5369fe89 100644 (file)
--- a/grid.c
+++ b/grid.c
@@ -39,7 +39,7 @@ typedef struct _board {
     char letters[4][4];
 
     /* Private, transient state used by enumerate */
-    trie_t *result_trie;
+    dict_t *result_trie;
 } board_t;
 
 int
@@ -155,7 +155,7 @@ board_solve (board_t *board, dict_t *dict, trie_t *solution)
 
     for (y = 0; y < 4; y++)
        for (x = 0; x < 4; x++)
-           board_enumerate (board, x, y, seen, &word, dict->trie);
+           board_enumerate (board, x, y, seen, &word, dict);
 
     string_fini (&word);
 }
@@ -207,7 +207,7 @@ main (void)
                else
                    t->flags |= TRIE_FLAGS_SEEN;
            } else {
-               t = trie_find (dict.trie, response);
+               t = trie_find (&dict, response);
                if (t && (t->flags & TRIE_FLAGS_IS_WORD))
                    printf ("(a good word, but it's not in the puzzle)\n");
                else