fixed unusual terminal state after quitting
This commit is contained in:
parent
bbaf2f50f9
commit
80a9d4d8ec
@ -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);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user