diff options
author | Frederick Yin <fkfd@fkfd.me> | 2022-06-02 10:34:58 +0800 |
---|---|---|
committer | Frederick Yin <fkfd@fkfd.me> | 2022-06-02 10:34:58 +0800 |
commit | 6e945b3f487d92d3cdf8706164da7040b9cb375a (patch) | |
tree | d9f03bb228f88678f22b52b0a3199118c834017c /sirtet.c | |
parent | a21182592bc2b57eac8d2c53df1cfde30d438372 (diff) |
Print game stats after exiting ncurses
Diffstat (limited to 'sirtet.c')
-rw-r--r-- | sirtet.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -224,6 +224,7 @@ void sirtet(int H, int W, int P) { } if (!has_placeable) { // game over + printmap(map, 1, 1, H, W); mvprintw(7, 2 * W + 8, "Game over"); mvprintw(8, 2 * W + 8, "Press any key to exit"); refresh(); @@ -245,6 +246,10 @@ void sirtet(int H, int W, int P) { // end ncurses endwin(); + + // print game stats + printf("SIRTET\n"); + printf("You scored %d points\n", points); } int main(int argc, char *argv[]) { |