From 9da70be7cce4ca97c3d5edc4bd432cecf49b207f Mon Sep 17 00:00:00 2001 From: Jonni Liljamo Date: Thu, 11 May 2023 09:19:06 +0300 Subject: [PATCH] feat(client): add plays and buys for players --- client/src/game_status/mod.rs | 2 ++ client/src/game_status/parser.rs | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/client/src/game_status/mod.rs b/client/src/game_status/mod.rs index 2fb997c..62a5095 100644 --- a/client/src/game_status/mod.rs +++ b/client/src/game_status/mod.rs @@ -54,6 +54,8 @@ pub enum PlayerState { pub struct PlayerStatus { pub state: PlayerState, + pub plays: i16, + pub buys: i16, pub currency: i16, pub vp: i16, pub hand: Vec, diff --git a/client/src/game_status/parser.rs b/client/src/game_status/parser.rs index d5621c3..d4e570b 100644 --- a/client/src/game_status/parser.rs +++ b/client/src/game_status/parser.rs @@ -52,6 +52,8 @@ pub fn parse(game: &Game) -> Result { game.host_id.clone(), PlayerStatus { state: PlayerState::Idle, + plays: 0, + buys: 0, currency: 0, vp: 2, hand: vec![], @@ -64,6 +66,8 @@ pub fn parse(game: &Game) -> Result { game.guest_id.clone(), PlayerStatus { state: PlayerState::Idle, + plays: 0, + buys: 0, currency: 0, vp: 2, hand: vec![], -- 2.44.1