feat(client): check for empty deck for a second time before drawing
1 files changed, 6 insertions(+), 3 deletions(-) M client/src/game_status/parser.rs
M client/src/game_status/parser.rs => client/src/game_status/parser.rs +6 -3
@@ 136,9 136,12 @@ fn parse_action(action: &Action, game: &Game, game_status: &mut GameStatus) { shuffle_discard_to_deck(target, action.seed.parse::<u64>().unwrap()); } target .hand .push(target.deck.pop().unwrap_or_else(|| unreachable!())); // NOTE: deck *might* still be empty, if discard was empty too if !target.deck.is_empty() { target .hand .push(target.deck.pop().unwrap_or_else(|| unreachable!())); } } } Command::Discard { index } => {