diff options
author | Daniel Jones <admin@danieljon.es> | 2020-04-27 12:21:09 +0930 |
---|---|---|
committer | Daniel Jones <admin@danieljon.es> | 2020-04-27 12:21:09 +0930 |
commit | 1615d0acf4876e61b2b00c741683908e2d8e7415 (patch) | |
tree | 47b71b5d85f0c4c60b905754c8be2c564f61d36f | |
parent | e3bdfd349bceed60ccfd0c79ac176847d13f1a6c (diff) | |
download | csweeper-1615d0acf4876e61b2b00c741683908e2d8e7415.tar.gz csweeper-1615d0acf4876e61b2b00c741683908e2d8e7415.zip |
prevent flashing in demo playback
-rw-r--r-- | ncsweeper.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ncsweeper.c b/ncsweeper.c index 301bfbf..ab1dc4c 100644 --- a/ncsweeper.c +++ b/ncsweeper.c @@ -284,13 +284,16 @@ void draw() { wclear(window); - clear(); box(window, 0, 0); if (!exitgame) { mvprintw(game.height+3, 0, "The aim of the game is to reveal all non-mine tiles or flag every mine tile"); mvprintw(game.height+5, 0, "hjkl/wasd to move cursor\nspace to reveal tile\nf to flag tile"); } + else + { + clear(); + } for (int x = 0; x < game.width; x++) { for (int y = 0; y < game.height; y++) @@ -683,6 +686,7 @@ main(int argc, char **argv) } if (checkwin()) { + exitgame = 1; revealmines(); draw(); mvprintw(game.height+3, 0, "you won"); |