]> git.cworth.org Git - grrobot/blobdiff - src/grrobot.c
* src/grrobot.c (grr_game_read_notices): Call new board_view timer
[grrobot] / src / grrobot.c
index a1746c3bd77517281e0933e1ccc92c9397366fb5..8df5b9815d9da75615c0f9ac690830007e1f2fa6 100644 (file)
@@ -273,6 +273,7 @@ grr_game_read_notices (grr_game_t *game)
                here. */
            game->state = RR_GAMESTATE_NEW;
 
+           grr_board_view_reset_timer (game->board_view);
            grr_game_print (game, "\nNew round!");
            rr_board_set_goal_target (board, notice->u.target);
            gtk_widget_queue_draw (GTK_WIDGET (game->window));
@@ -338,13 +339,14 @@ grr_game_read_notices (grr_game_t *game)
                             notice->u.number);
            break;
        case RR_NOTICE_ACTIVE:
+           grr_board_view_stop_timer (game->board_view);
            grr_game_printf (game, "\nUser %s now active to demonstrate solution in %d moves.",
                             notice->u.bid.username,
                             notice->u.bid.number);
            break;
        case RR_NOTICE_TIMER:
-           grr_game_printf (game, "\nTime remaining: %d seconds.",
-                            notice->u.number);
+           grr_board_view_start_timer (game->board_view,
+                                       notice->u.number);
            break;
        case RR_NOTICE_POSITION:
        {