summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorAtle Hellvik Havsø <atle@havso.net>2010-12-06 19:47:46 +0100
committerAtle Hellvik Havsø <atle@havso.net>2010-12-06 20:57:41 +0100
commitb56b7bbcd5c23a67b57d4332ee05147e33ee7e6b (patch)
tree7840fbde614465e42e9599d3db4982049aa0a228 /common
parentb140aca7ab3ce6d312bc147a82dcf016af72eafd (diff)
Added fields to the RoundEnd message.
Diffstat (limited to 'common')
-rw-r--r--common/message.h38
1 files changed, 37 insertions, 1 deletions
diff --git a/common/message.h b/common/message.h
index 1574838..4390cdd 100644
--- a/common/message.h
+++ b/common/message.h
@@ -202,14 +202,50 @@ namespace Message {
public:
typedef boost::shared_ptr<RoundEnd> p;
+ struct Score {
+ std::string nick;
+ int score;
+ int won;
+
+ template<class Archive>
+ void serialize(Archive & ar, const unsigned int v) {
+ ar & nick;
+ ar & score;
+ ar & won;
+ }
+ };
+
+ struct Yaku {
+ std::string name;
+ int value;
+
+ template<class Archive>
+ void serialize(Archive & ar, const unsigned int v) {
+ ar & name;
+ ar & value;
+ }
+ };
+
RoundEnd() : Base(Types::RoundEnd) {}
+ Tiles hand;
+ std::vector<Yaku> yakus;
+ int total_han;
+ int total_fu;
+ int won;
+ Score score[4];
template<class Archive>
void serialize(Archive & ar, const unsigned int v) {
-
+ ar & hand;
+ ar & yakus;
+ ar & total_han;
+ ar & total_fu;
+ ar & won;
+ ar & score;
}
};
+
typedef boost::shared_ptr<Base> p;
};