pub trait BattleController<R: BattleRules> {
// Required methods
fn battle(&self) -> &Battle<R>;
fn event_callback(&self) -> &Option<EventCallback<R>>;
fn set_event_callback(&mut self, callback: Option<EventCallback<R>>);
}
Expand description
A trait for types that have control over a battle.
Required Methods§
Sourcefn event_callback(&self) -> &Option<EventCallback<R>>
fn event_callback(&self) -> &Option<EventCallback<R>>
Returns the current event callback set to the battle.
Sourcefn set_event_callback(&mut self, callback: Option<EventCallback<R>>)
fn set_event_callback(&mut self, callback: Option<EventCallback<R>>)
Sets a new event callback for the battle. The current callback is discarded.