Adjust the appearance of the end of game text

This commit is contained in:
Jeremy Rand 2014-07-23 16:06:49 -05:00
parent 910b2aa1ad
commit 4b2930c433
1 changed files with 10 additions and 8 deletions

View File

@ -34,6 +34,7 @@ void printInstructions(void)
"\n"
" PRESS ANY KEY TO START");
// The amount of time the user waits to read the in
while (!kbhit())
seed++;
@ -79,17 +80,19 @@ void printBoard(void)
void gameWon(void)
{
printf("\nCONGRATULATIONS, YOU HAVE WON THE GAME!\n");
gotoxy(0, 22);
printf("YOU HAVE WON THE GAME! PRESS ANY KEY...\n");
cgetc();
exit(0);
initGame();
}
void gameLost(void)
{
printf("\nSORRY, NO MORE MOVES.\n");
gotoxy(0, 22);
printf("SORRY, NO MORE MOVES. PRESS ANY KEY...");
cgetc();
exit(0);
initGame();
}
@ -149,11 +152,10 @@ int main(void)
if (isGameWon())
gameWon();
if (isGameLost())
else if (isGameLost())
gameLost();
handleNextEvent();
else
handleNextEvent();
}
return 0;