Hitscreen gets updated after Player input and before win check
This commit is contained in:
@@ -104,12 +104,11 @@ void startGame(game_state *gs, hitfeed *hf) {
|
||||
time(&gs->startTime);
|
||||
while (checkWin(gs)) {
|
||||
updateScreen(gs);
|
||||
printHitFeed(gs, hf);
|
||||
playerInput(gs, hf);
|
||||
printHitFeed(gs, hf);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void quitProgram(void) {
|
||||
endwin();
|
||||
}
|
||||
@@ -456,11 +455,14 @@ void printHitFeed(game_state *gs, hitfeed *hf) {
|
||||
mvprintw(newMaxy + i, newMaxx, hf->history[i]);
|
||||
}
|
||||
/* Print best score above history feed */
|
||||
if (hf->besthit != 0) {
|
||||
/* There is a hit. So a best score can be displayed */
|
||||
char message[100];
|
||||
sprintf(message, "Best: %s (%i hits)", hf->beststreak, hf->besthit);
|
||||
mvprintw(newMaxy - 1, newMaxx, message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user