From 90d77e977fe0db416a260c286b36079ab0694f21 Mon Sep 17 00:00:00 2001 From: Vegard Storheil Eriksen Date: Thu, 25 Nov 2010 16:51:22 +0100 Subject: Changed contents of Message::RoundState. Made relevant changes to client. --- common/message.cpp | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'common/message.cpp') diff --git a/common/message.cpp b/common/message.cpp index 568ad9d..08c2cdd 100644 --- a/common/message.cpp +++ b/common/message.cpp @@ -136,18 +136,30 @@ Message::RoundState::RoundState() : BoostBase(Types::RoundState) { } -Message::RoundState::RoundState(State state_) : BoostBase(Types::RoundState), state(state_) { - +Message::RoundState::RoundState(State state) : BoostBase(Types::RoundState) { + // Compatibility constructor. To be removed. + for(std::size_t i = 0; i < 4; i++) { + hand[i] = state.players[i].hand; + open[i] = state.players[i].open; + pond[i] = state.players[i].pond; + possible_actions = state.possible_actions; + } } void Message::RoundState::serialize(boost::archive::text_oarchive& ar) { - ar & state; + ar & hand; + ar & open; + ar & pond; ar & dora; + ar & possible_actions; } void Message::RoundState::deserialize(boost::archive::text_iarchive& ar) { - ar & state; + ar & hand; + ar & open; + ar & pond; ar & dora; + ar & possible_actions; } Message::RoundAction::RoundAction() : BoostBase(Types::RoundAction) { -- cgit v1.2.3