Created the classes of states

parent 98201d25
No related merge requests found
Showing with 38 additions and 1 deletion
+38 -1
#include "application.h"
#include<iostream>
int main() {
std::cout << "it`s pacman!";
Application app;
}
\ No newline at end of file
class IState;
class IStateManager {
public:
IStateManager() = default;
virtual ~IStateManager() {};
virtual void set_next_state(IState* state) const = 0;
};
class IState {
public:
IState(IStateManager& state_manager) : m_state_manager(state_manager) {}
virtual bool do_step() = 0;
protected:
IStateManager& m_state_manager;
};
class Application : public IStateManager {
public:
int run() {
}
private:
void set_next_state(IState* ptr_state) const override{
}
void apply_deffer_state_change() {
}
private:
IState* m_ptr_state_next;
IState* m_ptr_state_current;
};
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment