//
// Created by sebastian on 23.12.25.
//

#ifndef DICEWARS_SIEDLER_APPLICATION_H
#define DICEWARS_SIEDLER_APPLICATION_H
#include <memory>
#include <vector>

#include "Window.h"


class Layer;

class Application
{
public:
    Application();
    ~Application();

    void run();
    void close() {running = false;}

    static Application& getInstance();
    [[nodiscard]] Window& getWindow() const {return *window;}
private:
    bool running = true;
    std::unique_ptr<Window> window;

    static Application* instance;

    std::vector<Layer*> layers;

protected:
    void pushLayer(Layer* layer);
};


#endif //DICEWARS_SIEDLER_APPLICATION_H