@@ 152,8 152,10 @@ fn parse_action(action: &Action, game: &Game, game_status: &mut GameStatus) {
// set player to idle
invoker.state = PlayerState::Idle;
- // clear currency
+ // clear stats
invoker.currency = 0;
+ invoker.plays = 0;
+ invoker.buys = 0;
let start_turn_action = Action::new(
&game.id,
@@ 172,6 174,10 @@ fn parse_action(action: &Action, game: &Game, game_status: &mut GameStatus) {
// set the target to the play phase
target.state = PlayerState::PlayPhase;
+ // give a play and a buy at the start
+ target.plays = 1;
+ target.buys = 1;
+
let draw_action = Action::new(
&game.id,
&action.target,