Add score and *the great line*

pull/2/head
Nakidai 2023-10-30 03:53:48 +03:00
parent b611b54575
commit a064af95da
Signed by untrusted user who does not match committer: nakidai
GPG Key ID: 914675D395210A97
1 changed files with 3 additions and 0 deletions

View File

@ -33,6 +33,7 @@ int main(int argc, char **argv)
Screen *screen = screenCreate(10, 10, ' '); Screen *screen = screenCreate(10, 10, ' ');
PlayerNode *node; PlayerNode *node;
thrd_t input_thread; thrd_t input_thread;
int i;
int head_x, head_y; int head_x, head_y;
Food food = generateFood(player); Food food = generateFood(player);
@ -76,6 +77,8 @@ int main(int argc, char **argv)
drawPlayer(player, screen); drawPlayer(player, screen);
*screenGetPoint(screen, food.x, food.y) = '@'; *screenGetPoint(screen, food.x, food.y) = '@';
screenShow(screen); screenShow(screen);
for (i = 0; i < 20; ++i) putchar('-');
printf("\nScore: %d\n", player->score);
thrd_sleep(&(struct timespec){.tv_sec=1}, NULL); thrd_sleep(&(struct timespec){.tv_sec=1}, NULL);
} }