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/game.h | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) (limited to 'server/game.h') diff --git a/server/game.h b/server/game.h index f88ffd4..f0f1564 100644 --- a/server/game.h +++ b/server/game.h @@ -10,6 +10,9 @@ #include "player.h" #include "../common/action.h" +#include "gamevariant.h" +#include "standard.h" + class Game : public boost::enable_shared_from_this { public: typedef boost::shared_ptr p; @@ -25,23 +28,7 @@ class Game : public boost::enable_shared_from_this { Game(Player::p player_1, Player::p player_2, Player::p player_3, Player::p player_4); - //! 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; + GameVariant *ruleset; //! Handle Ready message from player. void handle_ready(); -- cgit v1.2.3