rs48_lib 1.3.1

components of rs48
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use rand::random;

use super::{Controller, ControllerError, Move};
use crate::game::Game;

#[derive(Debug, Default)]
pub struct RandomController;

impl Controller for RandomController {
	fn next_move(&mut self, _game: &Game) -> Result<Move, ControllerError> {
		let movement = random();
		Ok(movement)
	}
}