Skip to content
This repository has been archived by the owner on Jul 28, 2024. It is now read-only.

Commit

Permalink
only run timer on first move + typo fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Ujhhgtg authored Sep 3, 2023
1 parent d73ee88 commit 44f4d4f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions game15.c
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,8 @@ static bool is_board_solved() {
static void game_tick() {
switch(game_state.scene) {
case ScenePlay:
game_state.tick_count++;
if (game_state.move_count >= 1)
game_state.tick_count++;
if (loaded_saving_ticks)
loaded_saving_ticks--;
if(moving_cell.move_direction == DirectionNone && !key_stack_is_empty()) {
Expand Down Expand Up @@ -367,7 +368,7 @@ static void render_callback(Canvas* const canvas) {
canvas_draw_rbox(canvas, 20, 24, 88, 16, 4);
canvas_set_color(canvas, ColorBlack);
canvas_draw_rframe(canvas, 20, 24, 88, 16, 4);
canvas_draw_str_aligned(canvas, 64, 32, AlignCenter, AlignCenter, "Restore game ...");
canvas_draw_str_aligned(canvas, 64, 32, AlignCenter, AlignCenter, "Restoring game ...");
}
}

Expand Down

0 comments on commit 44f4d4f

Please sign in to comment.