split components into a separate crate, switched to workspace
This commit is contained in:
parent
951a1aa4d4
commit
316d760b58
23 changed files with 935 additions and 60 deletions
34
rs48_lib/src/controller/simulated.rs
Normal file
34
rs48_lib/src/controller/simulated.rs
Normal file
|
@ -0,0 +1,34 @@
|
|||
use crate::lib::grid::Grid;
|
||||
|
||||
use super::{Controller, ControllerError, Move};
|
||||
|
||||
pub enum Objective {
|
||||
Score,
|
||||
TileCount,
|
||||
}
|
||||
|
||||
pub struct SimulatedController {
|
||||
_simulations_per_move: usize,
|
||||
_length_of_simulation: usize,
|
||||
_objective: Objective,
|
||||
}
|
||||
|
||||
impl SimulatedController {
|
||||
pub fn new(
|
||||
_simulations_per_move: usize,
|
||||
_length_of_simulation: usize,
|
||||
_objective: Objective,
|
||||
) -> Self {
|
||||
Self {
|
||||
_simulations_per_move,
|
||||
_length_of_simulation,
|
||||
_objective,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Controller for SimulatedController {
|
||||
fn next_move(&mut self, _grid: &Grid) -> Result<Move, ControllerError> {
|
||||
todo!()
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue