split components into a separate crate, switched to workspace

This commit is contained in:
JOLIMAITRE Matthieu 2022-09-03 02:32:54 +02:00
parent 951a1aa4d4
commit 316d760b58
23 changed files with 935 additions and 60 deletions

View 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!()
}
}