|
|
|
@ -2,6 +2,7 @@ |
|
|
|
|
#include <screen.h> |
|
|
|
|
#include <stdlib.h> |
|
|
|
|
#include <string.h> |
|
|
|
|
|
|
|
|
|
void drawScore(){ |
|
|
|
|
werase(scoreWin); |
|
|
|
|
box(scoreWin, 0, 0); |
|
|
|
@ -39,13 +40,17 @@ void drawGameOverWin(){ |
|
|
|
|
int gameOverWinRows, gameOverWinCols; |
|
|
|
|
getmaxyx(gameOverWin,gameOverWinRows,gameOverWinCols); |
|
|
|
|
mvwprintw(gameOverWin,1,(gameOverWinCols-strlen("GAME OVER"))/2,"%s","GAME OVER"); |
|
|
|
|
mvwprintw(gameOverWin,(gameOverWinRows/2)-1,1,"Shots Fired: %i",allEntities[0].projectilesFired); |
|
|
|
|
mvwprintw(gameOverWin,(gameOverWinRows/2),1,"Zombies Killed: %i",allEntities[0].killCount); |
|
|
|
|
mvwprintw(gameOverWin,(gameOverWinRows)-2,(gameOverWinCols-strlen("Press 'q' to quit"))/2,"%s","Press 'q' to quit"); |
|
|
|
|
nodelay(stdscr, FALSE); |
|
|
|
|
wnoutrefresh(gameOverWin); |
|
|
|
|
doupdate(); |
|
|
|
|
while(true){ |
|
|
|
|
char input = getch(); |
|
|
|
|
if (input == 'q' || input == 'Q'){ |
|
|
|
|
endwin(); |
|
|
|
|
exit(0); |
|
|
|
|
} |
|
|
|
|
drawGameOverWin(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|