diff options
author | Atle Hellvik Havsø <atle@havso.net> | 2010-11-22 20:08:56 +0100 |
---|---|---|
committer | Atle Hellvik Havsø <atle@havso.net> | 2010-11-22 20:09:18 +0100 |
commit | 62a05732e05a25f40fbb409e49ff30e3fc8bd28c (patch) | |
tree | f01f1b3946696042e532f423b7e3435befec6f8d /server/standard.h | |
parent | 56e4891bcdd693cfba540aec186f151012d96870 (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/standard.h')
-rw-r--r-- | server/standard.h | 37 |
1 files changed, 37 insertions, 0 deletions
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 + |