An even nicer end screen.

This commit is contained in:
David Vereb 2020-03-10 16:26:18 -04:00
parent 13dbb8d192
commit 58ddc34f88

View File

@ -116,13 +116,17 @@ int main(int argc, char *argv[])
clear(); clear();
mvprintw(middle_v - 3, middle_h - 5, mvprintw(middle_v - 3, middle_h - 5,
"You did it!"); "You did it!");
mvprintw(middle_v - 1, middle_h - 10, mvprintw(middle_v - 1, middle_h - 14,
"Questions Answered: %7d\n",
problems.size());
mvprintw(middle_v - 0, middle_h - 8,
"Time Elapsed: %02dm %02ds\n", "Time Elapsed: %02dm %02ds\n",
elapsed_time / 60, elapsed_time % 60); elapsed_time / 60, elapsed_time % 60);
mvprintw(middle_v - 0, middle_h - 11, mvprintw(middle_v + 1, middle_h - 13,
"Questions Answered: %2d\n", "Time Per Question: %02dm %02ds\n",
problems.size()); (elapsed_time / problems.size() / 60),
mvprintw(middle_v + 2, middle_h - 8, (elapsed_time / problems.size() % 60));
mvprintw(middle_v + 3, middle_h - 8,
"Press Q to quit."); "Press Q to quit.");
box(stdscr, '*', '*'); box(stdscr, '*', '*');
wrefresh(stdscr); wrefresh(stdscr);