Compare commits

...

1 Commits

Author SHA1 Message Date
80a9d4d8ec fixed unusual terminal state after quitting 2025-06-30 11:06:57 +03:00

View File

@ -177,10 +177,10 @@ void startGame(Board &board)
cursorX = (cursorX < boardSize.x - 1) ? cursorX + 1 : 0; cursorX = (cursorX < boardSize.x - 1) ? cursorX + 1 : 0;
break; break;
case 'q': case 'q':
exit(0);
echo(); echo();
cbreak(); cbreak();
endwin(); endwin();
exit(0);
break; break;
case 'z': case 'z':
if (!somethingHasBeenDone) if (!somethingHasBeenDone)
@ -283,10 +283,10 @@ void startGame(Board &board)
Board newBoard(boardSize.x, boardSize.y, board.getMineCount()); Board newBoard(boardSize.x, boardSize.y, board.getMineCount());
startGame(newBoard); startGame(newBoard);
} else if(c == 'q') { } else if(c == 'q') {
exit(0);
echo(); echo();
cbreak(); cbreak();
endwin(); endwin();
exit(0);
} }
}; };
} }
@ -313,10 +313,10 @@ void startGame(Board &board)
Board newBoard(boardSize.x, boardSize.y, board.getMineCount()); Board newBoard(boardSize.x, boardSize.y, board.getMineCount());
startGame(newBoard); startGame(newBoard);
} else if(c == 'q') { } else if(c == 'q') {
exit(0);
echo(); echo();
cbreak(); cbreak();
endwin(); endwin();
exit(0);
} }
}; };
} }