From 97951fe38059cc4f0757ebe83466327c556b4e2d Mon Sep 17 00:00:00 2001 From: Vegard Storheil Eriksen Date: Sat, 4 Dec 2010 15:31:03 +0100 Subject: Fill all fields in GameState and PlayerState. --- server/player.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'server/player.cpp') 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; } -- cgit v1.2.3