From 9632d192dfe0a0746ca8bac1f36a51c09c7fb9d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Balzarotti?= Date: Mon, 26 Dec 2016 15:52:51 +0100 Subject: [PATCH] fix: ncurses init in main --- Roofus.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Roofus.c b/Roofus.c index 038c096..4391f2c 100644 --- a/Roofus.c +++ b/Roofus.c @@ -1,4 +1,4 @@ -#define VERSION "1.00" +#define VERSION "1.01" #define N 9 #define USERNAME_LENGTH 10 @@ -31,6 +31,11 @@ int gridset = 0; FILE *fp; int main () { + initscr(); + noecho(); + cbreak(); + keypad(stdscr, true); + srand (time(NULL)); fp = fopen ("roofus.txt", "a+"); if (fp == NULL) { @@ -63,11 +68,6 @@ void restoregrid () { void menu (){ int mode; - initscr(); - noecho(); - cbreak(); - keypad(stdscr, true); - while (1) { clear(); printw ("~~~ ROOFUS ~~~\n\n[1] Play\n[2] Ranking\n[3] Settings\n[4] Rules\n[q] Quit\n\n");