Block enter during the game #22
This commit is contained in:
@@ -41,6 +41,7 @@ int main(int argc, char **argv) {
|
|||||||
gs->guesses = 0;
|
gs->guesses = 0;
|
||||||
gs->trollEnabled = 0;
|
gs->trollEnabled = 0;
|
||||||
keypad(stdscr, FALSE);
|
keypad(stdscr, FALSE);
|
||||||
|
nonl(); //No new line. Prevents the new line when hitting enter
|
||||||
|
|
||||||
curs_set(0);
|
curs_set(0);
|
||||||
while ( (c = getopt_long(argc, argv, short_options, long_options, NULL)) != -1 ) {
|
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);
|
drawFigure(gs, 0);
|
||||||
startGame(gs);
|
startGame(gs);
|
||||||
|
|
||||||
|
nl(); //enable newline again
|
||||||
while (getch() != 10);
|
while (getch() != 10);
|
||||||
clear();
|
clear();
|
||||||
free(gs);
|
free(gs);
|
||||||
|
Reference in New Issue
Block a user