Skip to content

Commit

Permalink
Restart button
Browse files Browse the repository at this point in the history
  • Loading branch information
cinaryilmaz committed Aug 29, 2022
1 parent e799c32 commit b5e1268
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/kernel.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,14 @@ void kernel_main(uint32_t magic, uint32_t addr)
random_seed();
LOG("Initialized");
LOG("Starting game");
start_game();
while (true)
{
start_game();
terminal_move_cursor_to(21, 30);
printf("\033[1;31mPress R to restart\033[1;37m");
while (!(keyboard_getchar() == 'r' || keyboard_getchar() == 'R'))
io_wait();
LOG("Restarting game");
terminal_clear();
}
}

0 comments on commit b5e1268

Please sign in to comment.