X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=grid.c;h=fe3d5402d2b52fbcdfb8a49f51e0ffde2da949ce;hb=ea2a992111737eccb174f26f71ab5357597d5147;hp=ed88df309b45cbddb8b63c5e0f5d359cbb9b65b5;hpb=352e7bb836a852c4df6810e6be58990f602cf7a1;p=wordgame diff --git a/grid.c b/grid.c index ed88df3..fe3d540 100644 --- a/grid.c +++ b/grid.c @@ -97,7 +97,8 @@ board_to_string (board_t *board, else *s++ = ' '; } - *s++ = '\n'; + if (y != 3) + *s++ = '\n'; } *s = '\0'; } @@ -135,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++)