From 18ae77860fa6e408a345532159c7f2470c42d990 Mon Sep 17 00:00:00 2001 From: Jeremy Rand Date: Thu, 24 Jul 2014 15:51:28 -0500 Subject: [PATCH] Display the high score and the tile target --- apple2048.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/apple2048.c b/apple2048.c index 51059ea..0735df7 100644 --- a/apple2048.c +++ b/apple2048.c @@ -161,9 +161,16 @@ void printValues(void) void printScore(void) { + tScore highestTile = highestTarget(); + gotoxy(0,20); - printf("SCORE: %10ld HI-SCORE: %10ld\nTRY TO GET THE %ld TILE!", - currentScore(), highScore(), nextTarget()); + printf("SCORE: %10ld HI-SCORE: %10ld\n", currentScore(), highScore()); + + if (highestTile == 0) { + printf("TRY TO GET THE %ld TILE!\n", nextTarget()); + } else { + printf("GOT %ld! NOW GET %ld!\n", highestTarget, nextTarget()); + } }