Compare commits

..

No commits in common. "cf2fa8a9c22791d39799bc1ee834ed4aea2de76c" and "2b6fd748490334abb2c2aa405d37bf225a1c851e" have entirely different histories.

View File

@ -255,15 +255,12 @@ void startGame(Board &board)
mvprintw(1, 8, "%s", tim); mvprintw(1, 8, "%s", tim);
attroff(COLOR_PAIR(3)); attroff(COLOR_PAIR(3));
refresh(); refresh();
while (true) while ((c = getch()) != 'q')
{ {
c = getch();
if (c == 'r') if (c == 'r')
{ {
Board newBoard(boardSize.x, boardSize.y, board.getMineCount()); Board newBoard(boardSize.x, boardSize.y, board.getMineCount());
startGame(newBoard); startGame(newBoard);
} else if(c == 'q') {
exit(0);
} }
}; };
} }
@ -282,15 +279,12 @@ void startGame(Board &board)
attroff(COLOR_PAIR(3)); attroff(COLOR_PAIR(3));
refresh(); refresh();
int c; int c;
while (true) while ((c = getch()) != 'q')
{ {
c = getch();
if (c == 'r') if (c == 'r')
{ {
Board newBoard(boardSize.x, boardSize.y, board.getMineCount()); Board newBoard(boardSize.x, boardSize.y, board.getMineCount());
startGame(newBoard); startGame(newBoard);
} else if(c == 'q') {
exit(0);
} }
}; };
} }