|
|
@ -10,8 +10,13 @@ void MainWindow::buttonPressed(QPushButton *button) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void MainWindow::newGame() {
|
|
|
|
void MainWindow::newGame() {
|
|
|
|
|
|
|
|
QMessageBox newGameDialog;
|
|
|
|
|
|
|
|
newGameDialog.setText("Do you really want to start a new game?");
|
|
|
|
|
|
|
|
newGameDialog.setStandardButtons(QMessageBox::Yes | QMessageBox::Cancel);
|
|
|
|
|
|
|
|
if (newGameDialog.exec() == QMessageBox::Yes) {
|
|
|
|
initialiseGame();
|
|
|
|
initialiseGame();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// initialisation functions
|
|
|
|
// initialisation functions
|
|
|
|
void MainWindow::initialiseGame() {
|
|
|
|
void MainWindow::initialiseGame() {
|
|
|
|