Code cleanup and documentation

This commit is contained in:
2025-10-18 21:35:01 +02:00
parent 6b0e858064
commit e124e3071e
17 changed files with 105 additions and 95 deletions

View File

@@ -1,7 +1,5 @@
/*
* Created by snapshot112 on 10/15/25.
*
* A game engine that can run and display games in square grids.
* Created by snapshot112 on 8/10/2025
*/
#include "grid_game_engine.h"
@@ -84,14 +82,13 @@ static void display_hackerman(const coordinate location) {
}
void graceful_exit(const coordinate message_location) {
mvaddstr(message_location.y, message_location.x, "Press ENTER or SPACE to exit.");
mvaddstr(message_location.y, message_location.x, "Press ENTER to exit.");
while (1) {
switch (getch()) {
case KEY_BACKSPACE:
case KEY_ESCAPE:
case KEY_ENTER:
case '\n':
case ' ':
return;
}
}