diff options
author | Vegard Storheil Eriksen <zyp@jvnv.net> | 2010-11-25 16:51:22 +0100 |
---|---|---|
committer | Vegard Storheil Eriksen <zyp@jvnv.net> | 2010-11-25 16:51:22 +0100 |
commit | 90d77e977fe0db416a260c286b36079ab0694f21 (patch) | |
tree | b7db6020cebae4af111360fef8bca5b19fa2af2c /common/message.cpp | |
parent | 825614edeb97f753215bc33fb33600be9d7884b2 (diff) |
Changed contents of Message::RoundState. Made relevant changes to client.
Diffstat (limited to 'common/message.cpp')
-rw-r--r-- | common/message.cpp | 20 |
1 files changed, 16 insertions, 4 deletions
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) { |