+private:
+ HeadlessEnvironment &env;
+ std::stack<State *> states;
+
+};
+
+
+class Application
+: public HeadlessApplication {
+
+public:
+ explicit Application(Environment &);
+ ~Application();
+
+ Application(const Application &) = delete;
+ Application &operator =(const Application &) = delete;
+
+ void Loop(int dt) override;
+
+ /// process all events in SDL's queue
+ void HandleEvents();
+ void Handle(const SDL_Event &);
+ void Handle(const SDL_WindowEvent &);
+ /// integrate to the next step with dt milliseconds passed
+ void Update(int dt);
+ /// push the current state to display
+ void Render();