pub trait Entrant<S, R: Sides> {
// Required methods
fn name(&self) -> &str;
fn start(&self, stage: &S, seed: u64) -> R;
fn bots(&self, seed: u64) -> Vec<(R::Side, Box<dyn Bot<R>>)>;
fn measure(&self) -> Box<dyn Measure<R>>;
// Provided method
fn record(&self, seed: u64, commands: &[R::Command]) -> Option<String> { ... }
}Expand description
One named bot as the runner plays it, over the stage definition S
(the data a stage is built from).
Required Methods§
Sourcefn start(&self, stage: &S, seed: u64) -> R
fn start(&self, stage: &S, seed: u64) -> R
The stage as this entrant plays it (a game with modes picks this
entrant’s), its luck from seed.
Provided Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".