DEVELOPMENT ENVIRONMENT

~liljamo/deck-builder

43cecdee88ba3749ec908ae18fb89ec2d29066f6 — Jonni Liljamo 1 year, 7 months ago 770581b
feat(client): draw 4 cards on turn start
1 files changed, 15 insertions(+), 0 deletions(-)

M client/src/game_status/parser.rs
M client/src/game_status/parser.rs => client/src/game_status/parser.rs +15 -0
@@ 166,6 166,21 @@ fn parse_action(action: &Action, game: &Game, game_status: &mut GameStatus) {
        Command::StartTurn {} => {
            // set the target to the play phase
            target.state = PlayerState::PlayPhase;

            let draw_action = Action::new(
                &game.id,
                &action.target,
                &action.target,
                &Command::Draw {
                    amount: 4,
                },
                seed_gen!(),
            );
            game_status
                .actions
                .insert(action_pos + 1, draw_action.clone());

            parse_action(&draw_action, game, game_status);
        }
        Command::ChangePlayerState { state } => {
            target.state = *state;