From 535076b839d14aeb4502b7b8479dcb6d3eb51cf0 Mon Sep 17 00:00:00 2001 From: phfr24 Date: Sat, 25 Oct 2025 23:26:06 -0300 Subject: [PATCH] formatting --- prototype.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/prototype.c b/prototype.c index c9c2afa..c297953 100644 --- a/prototype.c +++ b/prototype.c @@ -1,8 +1,8 @@ #include #include -#include #include #include +#include #define COLS 80 #define ROWS 25 @@ -15,13 +15,9 @@ #define STR(x) _STR(x) #define _STR(x) #x -static void clearscr() { - printf("\e[1;1H\e[2J"); -} +static void clearscr() { printf("\e[1;1H\e[2J"); } -static void print_row(char row[COLS]) { - printf("%." STR(COLS) "s\n", row); -} +static void print_row(char row[COLS]) { printf("%." STR(COLS) "s\n", row); } static void print_grid(char grid[COLS * ROWS]) { for (int i = 0; i < ROWS; i++) @@ -85,7 +81,7 @@ static void update_grid(char grid[COLS * ROWS]) { memcpy(grid, new, COLS * ROWS); } -int main () { +int main() { char grid[COLS * ROWS]; srand(time(0)); -- 2.54.0