From: Carl Worth Date: Sun, 24 Sep 2006 04:41:00 +0000 (-0700) Subject: grid: Don't consider 2-letter words as valid. X-Git-Url: https://git.cworth.org/git?p=wordgame;a=commitdiff_plain;h=ea2a992111737eccb174f26f71ab5357597d5147 grid: Don't consider 2-letter words as valid. --- diff --git a/grid.c b/grid.c index 76428d9..fe3d540 100644 --- 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++)