chore: fix deprecation warnings

This commit is contained in:
Henri Bourcereau 2026-02-07 11:00:30 +01:00
parent 7c02645446
commit 3ab0ad7a56
4 changed files with 20 additions and 20 deletions

View file

@ -324,10 +324,10 @@ pub fn get_valid_action_indices(game_state: &crate::GameState) -> Vec<usize> {
/// Sélectionne une action valide aléatoire
pub fn sample_valid_action(game_state: &crate::GameState) -> Option<TrictracAction> {
use rand::{seq::SliceRandom, thread_rng};
use rand::{prelude::IndexedRandom, rng};
let valid_actions = get_valid_actions(game_state);
let mut rng = thread_rng();
let mut rng = rng();
valid_actions.choose(&mut rng).cloned()
}