From b56b7bbcd5c23a67b57d4332ee05147e33ee7e6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Atle=20Hellvik=20Havs=C3=B8?= Date: Mon, 6 Dec 2010 19:47:46 +0100 Subject: Added fields to the RoundEnd message. --- common/message.h | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) 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 p; + struct Score { + std::string nick; + int score; + int won; + + template + void serialize(Archive & ar, const unsigned int v) { + ar & nick; + ar & score; + ar & won; + } + }; + + struct Yaku { + std::string name; + int value; + + template + void serialize(Archive & ar, const unsigned int v) { + ar & name; + ar & value; + } + }; + RoundEnd() : Base(Types::RoundEnd) {} + Tiles hand; + std::vector yakus; + int total_han; + int total_fu; + int won; + Score score[4]; template 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 p; }; -- cgit v1.2.3