You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

21 lines
566 B

#include "mainwindow.h"
#include <QApplication>
#include <QInputDialog>
// Точка входа: запрашивает размер поля (3–8) и запускает игру.
int main(int argc, char *argv[]) {
QApplication app(argc, argv);
bool ok = false;
const int size = QInputDialog::getInt(
nullptr, QObject::tr("Выключить свет"),
QObject::tr("Размер поля (3–8):"), 5, 3, 8, 1, &ok);
if (!ok) {
return 0;
}
MainWindow window(size);
window.show();
return app.exec();
}