[][src]Struct codegame::GameProcessor

pub struct GameProcessor<G: Game> { /* fields omitted */ }

Implementations

impl<G: Game + 'static> GameProcessor<G>[src]

pub fn new_full(
    full_options: FullOptions<G>,
    player_extra_data: &G::PlayerExtraData
) -> Self
[src]

pub fn new(
    seed: Option<u64>,
    options: G::Options,
    players: Vec<Box<dyn Player<G>>>
) -> Self
[src]

pub fn repeat_full(
    full_options: FullOptions<G>,
    player_extra_data: &G::PlayerExtraData,
    reader: impl Read + Send + 'static
) -> Self
[src]

pub fn repeat(
    reader: impl Read + Send + 'static,
    players: Vec<Box<dyn Player<G>>>
) -> Self
[src]

pub fn set_tick_handler(
    &mut self,
    handler: Box<dyn FnMut(Option<&Vec<G::Event>>, &G) + Send>
)
[src]

pub fn set_results_handler(
    &mut self,
    handler: Box<dyn FnOnce(FullResults<G>) + Send>
)
[src]

pub fn run(self)[src]

pub fn game(&self) -> &G

Important traits for &'_ mut R

impl<'_, R> Read for &'_ mut R where
    R: Read + ?Sized
impl<'_, W> Write for &'_ mut W where
    W: Write + ?Sized
impl<'_, I> Iterator for &'_ mut I where
    I: Iterator + ?Sized
type Item = <I as Iterator>::Item;impl<'_, F> Future for &'_ mut F where
    F: Unpin + Future + ?Sized
type Output = <F as Future>::Output;
[src]

pub fn finished(&self) -> bool[src]

Auto Trait Implementations

impl<G> !RefUnwindSafe for GameProcessor<G>

impl<G> Send for GameProcessor<G>

impl<G> !Sync for GameProcessor<G>

impl<G> Unpin for GameProcessor<G> where
    G: Unpin

impl<G> !UnwindSafe for GameProcessor<G>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> SetParameter for T

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,