Skip to content

Commit

Permalink
#35 set human player before dealing so playable cards are highlighted
Browse files Browse the repository at this point in the history
  • Loading branch information
dbravender committed Jan 10, 2025
1 parent 49c8f06 commit ba0f810
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/games/so8.rs
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,14 @@ impl SixOfVIIIGame {
}

pub fn new_with_human_player(human_player: usize) -> Self {
let mut game = Self::new();
let mut game = Self {
no_changes: false,
..Default::default()
};
let mut rng = rand::thread_rng();
game.dealer = rng.gen_range(0..4);
game.human_player = Some(human_player);
game.deal();
game
}

Expand Down

0 comments on commit ba0f810

Please sign in to comment.