aboutsummaryrefslogtreecommitdiff
path: root/main/puzzle/fsm/IBehaviouralState.hpp
diff options
context:
space:
mode:
authorThomasAvans <tv.intanker@student.avans.nl>2024-04-15 15:48:55 +0200
committerThomasAvans <tv.intanker@student.avans.nl>2024-04-15 15:48:55 +0200
commitd8fabca00814c4cceb9f0533252be8cbe1356234 (patch)
tree9e25c7ea8a0e8745ec0e45ded70f4a8251b34263 /main/puzzle/fsm/IBehaviouralState.hpp
parentfe3b1fdab95f8204f354e069708ea9c93e0c5fe8 (diff)
Added Finite State Machine implementation
Diffstat (limited to 'main/puzzle/fsm/IBehaviouralState.hpp')
-rw-r--r--main/puzzle/fsm/IBehaviouralState.hpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/main/puzzle/fsm/IBehaviouralState.hpp b/main/puzzle/fsm/IBehaviouralState.hpp
new file mode 100644
index 0000000..c41fef3
--- /dev/null
+++ b/main/puzzle/fsm/IBehaviouralState.hpp
@@ -0,0 +1,25 @@
+#ifndef _FSM_IBEHAVIOURALSTATE_HPP_
+#define _FSM_IBEHAVIOURALSTATE_HPP_
+
+/// <summary>
+/// Sub class used to define methods implemented by behavioural specific states.
+/// </summary>
+class IBehaviouralState {
+public:
+ /// <summary>
+ /// Enters the current state. Used for setup.
+ /// </summary>
+ virtual void enter() = 0;
+
+ /// <summary>
+ /// Updates the current state, used for physics, etc.
+ /// </summary>
+ virtual void act() = 0;
+
+ /// <summary>
+ /// Exits the state, used for cleanup.
+ /// </summary>
+ virtual void exit() = 0;
+};
+
+#endif // _FSM_IBEHAVIOURALSTATE_HPP_ \ No newline at end of file