This was implemented early on before there was GUI feedback upon
finishing the game. It is no longer necessary.
if ((mask = game_do_move(&state->board, x, y)) != 0) {
if (game_check_goal(&state->board) == 0) {
if ((mask = game_do_move(&state->board, x, y)) != 0) {
if (game_check_goal(&state->board) == 0) {
- int_fast32_t ms = game_finish(&state->board);
- unsigned min, sec;
-
- ui_timer_update(state, ms);
-
- sec = ms / 1000, ms %= 1000;
- min = sec / 60, sec %= 60;
- printf("You won! Time was %u:%.2u.%.3u\n",
- min, sec, (unsigned)ms);
-
+ ui_timer_update(state, game_finish(&state->board));