]> git.lizzy.rs Git - ttfe.git/commitdiff
Print game over message after quit from alternative screen
authorElias Fleckenstein <eliasfleckenstein@web.de>
Mon, 7 Jun 2021 13:41:30 +0000 (15:41 +0200)
committerElias Fleckenstein <eliasfleckenstein@web.de>
Mon, 7 Jun 2021 13:41:30 +0000 (15:41 +0200)
main.c

diff --git a/main.c b/main.c
index 26b77c1d15bce428a408d558e138290684f2663c..17ccf3fd5f27e7c9225c826defc8026aef5cded4 100644 (file)
--- a/main.c
+++ b/main.c
@@ -47,10 +47,10 @@ void game_start() {
        tcsetattr(STDIN_FILENO, TCSANOW, &newtio);
        board *b = new_board();
        game_loop(b);
-       print_score(b);
-       free_board(b);
        printf("\e[?1049l\e[?25h");
        tcsetattr(STDIN_FILENO, TCSANOW, &oldtio);
+       print_score(b);
+       free_board(b);
 }
 
 enum direction get_input()