]> git.cworth.org Git - wordgame/commitdiff
grid: Don't consider 2-letter words as valid.
authorCarl Worth <cworth@raht.cworth.org>
Sun, 24 Sep 2006 04:41:00 +0000 (21:41 -0700)
committerCarl Worth <cworth@raht.cworth.org>
Sun, 24 Sep 2006 04:41:00 +0000 (21:41 -0700)
grid.c

diff --git a/grid.c b/grid.c
index 76428d98bad2b6275c635f635bbef7fdc0d4b852..fe3d5402d2b52fbcdfb8a49f51e0ffde2da949ce 100644 (file)
--- a/grid.c
+++ b/grid.c
@@ -136,8 +136,11 @@ board_enumerate (board_t   *board,
        dict_cursor = dict_cursor_next (dict_cursor, 'u');
     }
 
-    if (DICT_ENTRY_IS_WORD (dict_cursor_resolve (dict_cursor)))
+    if (strlen (word) > 2 &&
+       DICT_ENTRY_IS_WORD (dict_cursor_resolve (dict_cursor)))
+    {
        dict_add_word (board->results, word);
+    }
 
     for (dy = -1; dy <= 1; dy++)
        for (dx = -1; dx <= 1; dx++)