@ -169,16 +169,9 @@ void drawGameOverWin(){
mvwprintw ( gameOverWin , 1 , ( gameOverWinCols - strlen ( " GAME OVER " ) ) / 2 , " %s " , " GAME OVER " ) ;
mvwprintw ( gameOverWin , 3 , 5 , " Zombies Killed: %i " , allEntities [ 0 ] . killCount ) ;
mvwprintw ( gameOverWin , 4 , 8 , " Shots Fired: %i " , allEntities [ 0 ] . projectilesFired ) ;
if ( allEntities [ 0 ] . projectilesFired ! = 0 ) {
float hitPercent = ( ( ( float ) allEntities [ 0 ] . hitCount / ( float ) allEntities [ 0 ] . projectilesFired ) * 100 ) ;
mvwprintw ( gameOverWin , 5 , 11 , " Accuracy: %.0f%% " , hitPercent ) ;
}
else {
mvwprintw ( gameOverWin , 5 , 11 , " Accuracy: N/A " ) ;
}
int mins = secsElapsed / 60 ;
int secs = ( int ) secsElapsed % 60 ;
mvwprintw ( gameOverWin , 6 , 15 , " Time: %02d:%02d " , mins , secs ) ;
mvwprintw ( gameOverWin , 5 , 15 , " Time: %02d:%02d " , mins , secs ) ;
mvwprintw ( gameOverWin , ( gameOverWinRows ) - 2 , ( gameOverWinCols - strlen ( " Press 'q' to quit or 'r' to restart " ) ) / 2 , " %s " , " Press 'q' to quit or 'r' to restart " ) ;
nodelay ( stdscr , FALSE ) ;
box ( gameOverWin , 0 , 0 ) ;