From: Armaan Bhojwani Date: Sat, 15 May 2021 21:49:15 +0000 (-0400) Subject: Draw scores in center X-Git-Url: https://git.armaanb.net/?p=pong.git;a=commitdiff_plain;h=4eb214afe9a262d43a355260029868f2f6baf050 Draw scores in center --- diff --git a/pong.c b/pong.c index 5b7b039..83d3647 100644 --- a/pong.c +++ b/pong.c @@ -86,8 +86,9 @@ main(void) { mvprintw(i, max_x/2, ":"); } - mvprintw(0, 2, "%d", a_score); - mvprintw(0, max_x - 1, "%d", b_score); + // Draw scrores + mvprintw(0, max_x/2 - 2, "%d", a_score); + mvprintw(0, max_x/2 + 2, "%d", b_score); // Move ball if enough time has elapsed gettimeofday(&stop, NULL);