summaryrefslogtreecommitdiff
path: root/common/message.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'common/message.cpp')
-rw-r--r--common/message.cpp20
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) {