diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/cgol.c | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -44,7 +44,7 @@ static bool *grid_cur, *grid_next; int main(int argc, char **argv) { - int opt; + int opt, c; width = 0; height = 0; @@ -84,7 +84,14 @@ main(int argc, char **argv) init_curses(); init_game(); - getch(); + timeout(1000); + for (;;) { + c = getch(); + if (c == 'q') { + break; + } + tick(); + } fini_game(); fini_curses(); |