This commit is contained in:
Jiří Stach committed 2025-07-29 13:42:48 +02:00
1 parent d0a1e9e8ab
commit 4ec6b7993c
4 files changed
+214 -2

No files matched your search

+25
View File
@@ -0,0 +1,25 @@
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <ncurses.h>
int main() {
srand(time(NULL)); // Seed for random number generation
initscr(); // Initialize ncurses
noecho(); // Don't echo pressed keys
curs_set(0); // Hide the cursor
setup();
while (!gameOver()) {
draw();
input();
logic();
usleep(100000); // Sleep for a short duration
}
endwin(); // End ncurses mode
printf("Game Over!\n");
return 0;
}