From b5a38cff723f1389f7e69bb88da31629d0f59b15 Mon Sep 17 00:00:00 2001 From: JOLIMAITRE Matthieu Date: Mon, 4 Apr 2022 17:32:21 +0300 Subject: [PATCH] added constructor to the random controller --- src/lib/controller/random.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/lib/controller/random.rs b/src/lib/controller/random.rs index cb68ba3..3446d9f 100644 --- a/src/lib/controller/random.rs +++ b/src/lib/controller/random.rs @@ -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 { let movement = random();