From 359e55de4bc81fd5733272cb856104a1765f2726 Mon Sep 17 00:00:00 2001 From: structix Date: Mon, 22 May 2017 18:21:16 +0200 Subject: [PATCH] Block enter during the game #22 --- hangman.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hangman.c b/hangman.c index 7385d60..2bcf952 100644 --- a/hangman.c +++ b/hangman.c @@ -41,6 +41,7 @@ int main(int argc, char **argv) { gs->guesses = 0; gs->trollEnabled = 0; keypad(stdscr, FALSE); + nonl(); //No new line. Prevents the new line when hitting enter curs_set(0); while ( (c = getopt_long(argc, argv, short_options, long_options, NULL)) != -1 ) { @@ -86,7 +87,7 @@ int main(int argc, char **argv) { drawFigure(gs, 0); startGame(gs); - + nl(); //enable newline again while (getch() != 10); clear(); free(gs);