DEVELOPMENT ENVIRONMENT

~liljamo/deck-builder

c61a160e7a798e9914aeb77770228b41e2e50ab9 — Jonni Liljamo 1 year, 5 months ago 079466e
feat(client): give players buys and plays on start
1 files changed, 7 insertions(+), 1 deletions(-)

M client/src/game_status/parser.rs
M client/src/game_status/parser.rs => client/src/game_status/parser.rs +7 -1
@@ 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,