diff options
author | Vegard Storheil Eriksen <zyp@jvnv.net> | 2010-12-04 15:31:03 +0100 |
---|---|---|
committer | Vegard Storheil Eriksen <zyp@jvnv.net> | 2010-12-04 15:31:19 +0100 |
commit | 97951fe38059cc4f0757ebe83466327c556b4e2d (patch) | |
tree | 9d4946c36317eecd40fc19d6b32c07a15ca5aa13 /server/player.cpp | |
parent | b85a6cdad782bc80507fa764cd1b18e9cd5b4191 (diff) |
Fill all fields in GameState and PlayerState.
Diffstat (limited to 'server/player.cpp')
-rw-r--r-- | server/player.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/server/player.cpp b/server/player.cpp index 6673937..8397c48 100644 --- a/server/player.cpp +++ b/server/player.cpp @@ -2,12 +2,14 @@ #include "hand.h" -void Game::Player::round_start() { +void Game::Player::round_start(int w) { // Reset contents. hand.clear(); open.clear(); pond.clear(); riichi = false; + score = 25000; + wind = w; // Notify client of round start. client->round_start(); @@ -17,7 +19,7 @@ PlayerState Game::Player::get_state() { Tilegroups h = open; h.insert(h.begin(), hand); - PlayerState state = {h, pond}; + PlayerState state = {h, pond, riichi, score, wind}; return state; } @@ -25,7 +27,7 @@ PlayerState Game::Player::get_state_filtered() { Tilegroups h = open; h.insert(h.begin(), hand); - PlayerState state = {h, pond}; + PlayerState state = {h, pond, riichi, score, wind}; return state; } |