From 62a05732e05a25f40fbb409e49ff30e3fc8bd28c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Atle=20Hellvik=20Havs=C3=B8?= Date: Mon, 22 Nov 2010 20:08:56 +0100 Subject: Moved lots of code in Game out into a separate class. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Atle Hellvik Havsø --- server/standard.h | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 server/standard.h (limited to 'server/standard.h') diff --git a/server/standard.h b/server/standard.h new file mode 100644 index 0000000..de81e7f --- /dev/null +++ b/server/standard.h @@ -0,0 +1,37 @@ +#ifndef STANDARD_H +#define STANDARD_H + +#include "gamevariant.h" + +#include "wall.h" +#include "../common/set.h" + +namespace RuleSet { + class Standard : public GameVariant { + private: + //! The wall that belongs to this game + Wall wall; + + //! The current state of the game + State game_state; + + //! Current player, used when discarding etc + int current_player; + + //! Are we in draw or discard phase? + bool draw_phase; + + //! Number of players doing action + int num_player_actions; + + //! Highest value action done + Action most_value_action; + + public: + virtual void round_start(); + virtual State& round_update(); + virtual bool round_action(Action action); + }; +}; +#endif // STANDARD_H + -- cgit v1.2.3