#include #include #include "Queue.h" #include "Audio.h" #include "FileManager.h" #include "Player.h" #include "Window.h" 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::InputQueue = new InputQueue; Window::GameQueue = new GameQueue; Window::AudioManager = new Audio; Window::FileManager = new FileManager; Window window; window.show(); auto player = new Player; Window::InputQueue->registerListener(player); Window::GameQueue->registerListener(player); Window::GameQueue->submitEvent(new CoinCollectEvent); Window::GameQueue->submitEvent(new DamageEvent); return QApplication::exec(); }