From: phfr24 Date: Sun, 26 Oct 2025 01:59:43 +0000 (-0300) Subject: quit on q X-Git-Url: https://git.wirehaze.ovh/lifeboot.git/commitdiff_plain/573b9d3c6df3797d305b01de33e74ce3df48d537?ds=inline quit on q --- diff --git a/prototype.c b/prototype.c index bc414d5..a26ad5c 100644 --- a/prototype.c +++ b/prototype.c @@ -91,12 +91,11 @@ int main () { srand(time(0)); init_grid(grid); - for (;;) { + do { clearscr(); print_grid(grid); update_grid(grid); - getchar(); - } + } while (getchar() != 'q'); return 0; }