chore(refact): rename modules with 'trictrac-' prefixes
This commit is contained in:
parent
54d9ad70ad
commit
257665c546
20 changed files with 157 additions and 154 deletions
|
|
@ -1,5 +1,5 @@
|
|||
use crate::{BotStrategy, CheckerMove, Color, GameState, PlayerId};
|
||||
use store::MoveRules;
|
||||
use trictrac_store::MoveRules;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct DefaultStrategy {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ use burn_rl::base::{ElemType, Model, State};
|
|||
|
||||
use crate::{BotStrategy, CheckerMove, Color, GameState, PlayerId};
|
||||
use log::info;
|
||||
use store::MoveRules;
|
||||
use trictrac_store::MoveRules;
|
||||
|
||||
use crate::burnrl::algos::dqn;
|
||||
use crate::burnrl::environment;
|
||||
|
|
@ -152,7 +152,7 @@ impl BotStrategy for DqnBurnStrategy {
|
|||
to1 = if fto1 < 0 { 0 } else { fto1 as usize };
|
||||
}
|
||||
|
||||
let checker_move1 = store::CheckerMove::new(from1, to1).unwrap_or_default();
|
||||
let checker_move1 = trictrac_store::CheckerMove::new(from1, to1).unwrap_or_default();
|
||||
|
||||
let mut tmp_board = self.game.board.clone();
|
||||
let move_res = tmp_board.move_checker(&self.color, checker_move1);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
use crate::{BotStrategy, CheckerMove, Color, GameState, PlayerId};
|
||||
use rand::{prelude::IndexedRandom, rng};
|
||||
use store::MoveRules;
|
||||
use trictrac_store::MoveRules;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct RandomStrategy {
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ use std::io::Read;
|
|||
use std::io::Write;
|
||||
use std::path::Path;
|
||||
use std::process::Command;
|
||||
use store::MoveRules;
|
||||
use trictrac_store::MoveRules;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct StableBaselines3Strategy {
|
||||
|
|
@ -79,12 +79,12 @@ impl StableBaselines3Strategy {
|
|||
|
||||
// Convertir l'étape du tour en entier
|
||||
let turn_stage = match self.game.turn_stage {
|
||||
store::TurnStage::RollDice => 0,
|
||||
store::TurnStage::RollWaiting => 1,
|
||||
store::TurnStage::MarkPoints => 2,
|
||||
store::TurnStage::HoldOrGoChoice => 3,
|
||||
store::TurnStage::Move => 4,
|
||||
store::TurnStage::MarkAdvPoints => 5,
|
||||
trictrac_store::TurnStage::RollDice => 0,
|
||||
trictrac_store::TurnStage::RollWaiting => 1,
|
||||
trictrac_store::TurnStage::MarkPoints => 2,
|
||||
trictrac_store::TurnStage::HoldOrGoChoice => 3,
|
||||
trictrac_store::TurnStage::Move => 4,
|
||||
trictrac_store::TurnStage::MarkAdvPoints => 5,
|
||||
};
|
||||
|
||||
// Récupérer les points et trous des joueurs
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue