- for (y = 0; y < 4; y++)
- for (x = 0; x < 4; x++)
- board_enumerate (board, x, y, seen, word, dict_root (dict));
-}
-
-#define GAME_LENGTH (3 * 60)
-int
-main (void)
-{
- dict_t dict, solution;
- board_t board;
- char board_string[BOARD_STRING_MAX];
- struct timeval tv;
-
- gettimeofday (&tv, NULL);
- srand (tv.tv_sec ^ tv.tv_usec);
-
- dict_init (&dict);
- dict_add_words_from_file (&dict, "words.txt");
-
- board_init (&board);
- board_to_string (&board, board_string);
-
- dict_init (&solution);
- board_solve (&board, &dict, &solution);
-
- word_game_play (board_string, &dict, &solution, GAME_LENGTH);
-
- dict_fini (&solution);
- dict_fini (&dict);
-
- return 0;
+ for (y = 0; y < grid->size; y++)
+ for (x = 0; x < grid->size; x++)
+ grid_enumerate (grid, x, y, seen, word, dict_root (dict));