- 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;
-
- /* Negative time just means clock jumps and
- * display headaches. */
- if (ms < 0)
- ms = 0;
-
- sec = ms / 1000, ms %= 1000;
- min = sec / 60, sec %= 60;
- printf("You won! Time was %u:%.2u:%.3u\n",
- min, sec, (unsigned)ms);
- mask |= ~GOAL_MASK;
- }
-
- x11_redraw_game(state, mask);
- }
-}
-
-static void set_view_goal(struct app_state *state, int view_goal)
-{
- state->view_goal_on_game = view_goal;
- x11_redraw_game(state, game_check_goal(&state->board));
+ mask = resize_helper(w, state->game_sz, 5);
+ if (mask)
+ x11_redraw_game(data, mask);