Files
utun2/tools/lightsout/src/main.cpp
T

22 lines
566 B
C++
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#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();
}