summaryrefslogtreecommitdiff
path: root/server/gamevariant.h
diff options
context:
space:
mode:
authorAtle Hellvik Havsø <atle@havso.net>2010-11-22 20:08:56 +0100
committerAtle Hellvik Havsø <atle@havso.net>2010-11-22 20:09:18 +0100
commit62a05732e05a25f40fbb409e49ff30e3fc8bd28c (patch)
treef01f1b3946696042e532f423b7e3435befec6f8d /server/gamevariant.h
parent56e4891bcdd693cfba540aec186f151012d96870 (diff)
Moved lots of code in Game out into a separate class.
Signed-off-by: Atle Hellvik Havsø <atle@havso.net>
Diffstat (limited to 'server/gamevariant.h')
-rw-r--r--server/gamevariant.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/server/gamevariant.h b/server/gamevariant.h
new file mode 100644
index 0000000..6fb2c56
--- /dev/null
+++ b/server/gamevariant.h
@@ -0,0 +1,20 @@
+#ifndef GAMEVARIANT_H
+#define GAMEVARIANT_H
+
+#include "../common/state.h"
+#include "../common/action.h"
+
+class GameVariant {
+ private:
+ State game_state;
+
+ public:
+ virtual ~GameVariant(){};
+
+ virtual void round_start() = 0;
+ virtual State& round_update() = 0;
+ virtual bool round_action(Action action) = 0;
+};
+
+#endif // GAMEVARIANT_H
+