diff --git a/src/Window.cpp b/src/Window.cpp index a5e5e7d..9e77cac 100644 --- a/src/Window.cpp +++ b/src/Window.cpp @@ -4,17 +4,16 @@ Window::Window() { timer = new QTimer(this); timer->setInterval(17); - connect(timer, &QTimer::timeout, this, [this](){ - update(); - }); + connect(timer, &QTimer::timeout, this, [this]{ update(); }); timer->start(); label = new QLabel(this); label->resize(size()); } -void Window::paintEvent(QPaintEvent *) { +void Window::paintEvent(QPaintEvent *event) { auto output = new QPixmap(label->size()); + output->fill(Qt::white); game.draw(output); label->setPixmap(*output); } diff --git a/src/main.cpp b/src/main.cpp index ea305f1..dabe693 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -7,20 +7,6 @@ using std::cout, std::endl; int main(int argc, char * argv[]){ QApplication app(argc, argv); - /* - for (int i = 0; i < 100'000; i++) - audioManager->playSound(1, i); - */ - - /* - for (int i = 0; i < 10'000; i++){ - FileManager->readFile("path" + std::to_string(i), [](const std::string& content){ - std::cout << content << std::endl; - }); - FileManager->writeFile("path" + std::to_string(i), "some content" + std::to_string(i)); - } - */ - Window w; w.show();