summaryrefslogtreecommitdiff
path: root/server/player.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'server/player.cpp')
-rw-r--r--server/player.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/server/player.cpp b/server/player.cpp
index 27c4b73..bf3973c 100644
--- a/server/player.cpp
+++ b/server/player.cpp
@@ -14,6 +14,7 @@ void Player::round_start(int w) {
riichi = false;
score = 25000;
wind = w;
+ won = 0;
// Notify client of round start.
client->round_start();
@@ -434,6 +435,8 @@ void Player::declare_ron(Tile tile) {
}
void Player::declare_tsumo() {
+ won = true;
+
List<Sets> hands = Hand::get_breakdowns(hand);
Sets hand = hands.front();
@@ -442,6 +445,8 @@ void Player::declare_tsumo() {
Score score = calculate_score(hand, true);
std::cout << "Tsumo: " << score.han() << " han, " << score.fu << " fu: " << score.tsumo_east() << "/" << score.tsumo() << "." << std::endl;
+
+ won_value = score;
}
Score Player::calculate_score(const Sets& hand, bool tsumo) {