chore: fix deprecation warnings

This commit is contained in:
Henri Bourcereau 2026-02-07 11:00:30 +01:00
parent 8f8e7f958b
commit 54d9ad70ad
4 changed files with 20 additions and 20 deletions

View file

@ -1,4 +1,5 @@
use crate::{BotStrategy, CheckerMove, Color, GameState, PlayerId};
use rand::{prelude::IndexedRandom, rng};
use store::MoveRules;
#[derive(Debug)]
@ -51,8 +52,7 @@ impl BotStrategy for RandomStrategy {
let rules = MoveRules::new(&self.color, &self.game.board, self.game.dice);
let possible_moves = rules.get_possible_moves_sequences(true, vec![]);
use rand::{seq::SliceRandom, thread_rng};
let mut rng = thread_rng();
let mut rng = rng();
let choosen_move = possible_moves
.choose(&mut rng)
.cloned()