added constructor to the random controller
This commit is contained in:
parent
4c821be1fe
commit
b5a38cff72
1 changed files with 6 additions and 0 deletions
|
@ -5,6 +5,12 @@ use crate::lib::grid::Grid;
|
|||
|
||||
pub struct RandomController;
|
||||
|
||||
impl RandomController {
|
||||
pub fn new() -> Self {
|
||||
Self
|
||||
}
|
||||
}
|
||||
|
||||
impl Controller for RandomController {
|
||||
fn next_move(&mut self, _grid: &Grid) -> Result<Move, ControllerError> {
|
||||
let movement = random();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue