DEVELOPMENT ENVIRONMENT

~liljamo/deck-builder

c4efcc1a742f98aa11e4a80b78afea3cac639bd2 — Jonni Liljamo 1 year, 4 months ago fa602b0
fix(client): check deck len in MarkCardInDeckToBeTrashed
1 files changed, 3 insertions(+), 0 deletions(-)

M client/src/game_status/parser.rs
M client/src/game_status/parser.rs => client/src/game_status/parser.rs +3 -0
@@ 268,6 268,9 @@ fn parse_action(action: &Action, game: &Game, game_status: &mut GameStatus) {
            target.vp += amount;
        }
        Command::MarkCardInDeckToBeTrashed { index } => {
            if target.deck.len() == 0 {
                return;
            }
            match index {
                Some(index) => {
                    target.deck.get_mut(*index).unwrap().to_be_trashed = true;