From a064af95da8425ba1621a3c8f7aa7d864ec31773 Mon Sep 17 00:00:00 2001 From: Nakidai Date: Mon, 30 Oct 2023 03:53:48 +0300 Subject: [PATCH] Add score and *the great line* --- src/main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main.c b/src/main.c index 997da19..18e5d70 100644 --- a/src/main.c +++ b/src/main.c @@ -33,6 +33,7 @@ int main(int argc, char **argv) Screen *screen = screenCreate(10, 10, ' '); PlayerNode *node; thrd_t input_thread; + int i; int head_x, head_y; Food food = generateFood(player); @@ -76,6 +77,8 @@ int main(int argc, char **argv) drawPlayer(player, screen); *screenGetPoint(screen, food.x, food.y) = '@'; screenShow(screen); + for (i = 0; i < 20; ++i) putchar('-'); + printf("\nScore: %d\n", player->score); thrd_sleep(&(struct timespec){.tv_sec=1}, NULL); }