pub struct AIGameController { /* private fields */ }
Expand description
AI Game Controller - manages AI gameplay
Implementations§
Source§impl AIGameController
impl AIGameController
Sourcepub fn new(config: GameConfig, algorithm: AIAlgorithm) -> GameResult<Self>
pub fn new(config: GameConfig, algorithm: AIAlgorithm) -> GameResult<Self>
Create a new AI game controller
Sourcepub fn set_auto_play(&mut self, auto_play: bool)
pub fn set_auto_play(&mut self, auto_play: bool)
Set auto-play mode
Sourcepub fn set_move_delay(&mut self, delay_ms: u64)
pub fn set_move_delay(&mut self, delay_ms: u64)
Set move delay for auto-play
Sourcepub fn make_ai_move(&mut self) -> GameResult<bool>
pub fn make_ai_move(&mut self) -> GameResult<bool>
Make an AI move
Sourcepub fn new_game(&mut self) -> GameResult<()>
pub fn new_game(&mut self) -> GameResult<()>
Start a new AI game
Sourcepub fn algorithm(&self) -> AIAlgorithm
pub fn algorithm(&self) -> AIAlgorithm
Get the AI algorithm being used
Auto Trait Implementations§
impl Freeze for AIGameController
impl RefUnwindSafe for AIGameController
impl Send for AIGameController
impl Sync for AIGameController
impl Unpin for AIGameController
impl UnwindSafe for AIGameController
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more