[][src]Trait codegame::Game

pub trait Game: Diff {
    type Options: Serialize + for<'de> Deserialize<'de> + Sync + Send + Clone + 'static;
    type OptionsPreset: Debug + Serialize + for<'de> Deserialize<'de> + Sync + Send + Clone + 'static + Into<Self::Options>;
    type PlayerOptions: PlayerOptions<Self> + Serialize + for<'de> Deserialize<'de> + Sync + Send + Clone + 'static;
    type Action: Serialize + for<'de> Deserialize<'de> + Trans + Sync + Send + Clone + 'static;
    type Event: Serialize + for<'de> Deserialize<'de> + Trans + Sync + Send + Clone + 'static;
    type PlayerView: Serialize + for<'de> Deserialize<'de> + Trans + Sync + Send + Clone + 'static;
    type Results: Serialize + for<'de> Deserialize<'de> + Sync + Send + Clone + 'static;
    type DebugData: Serialize + for<'de> Deserialize<'de> + Trans + Sync + Send + Clone + 'static;
    type DebugState: Serialize + for<'de> Deserialize<'de> + Trans + Sync + Send + Clone + 'static;
    pub fn init(
        rng: &mut dyn RngCore,
        player_count: usize,
        options: Self::Options
    ) -> Self;
pub fn player_view(&self, player_index: usize) -> Self::PlayerView;
pub fn process_turn(
        &mut self,
        rng: &mut dyn RngCore,
        actions: HashMap<usize, Self::Action>
    ) -> Vec<Self::Event>

Notable traits for Vec<u8, Global>

impl Write for Vec<u8, Global>
;
pub fn finished(&self) -> bool;
pub fn results(&self) -> Self::Results; }

Associated Types

type Options: Serialize + for<'de> Deserialize<'de> + Sync + Send + Clone + 'static[src]

type OptionsPreset: Debug + Serialize + for<'de> Deserialize<'de> + Sync + Send + Clone + 'static + Into<Self::Options>[src]

type PlayerOptions: PlayerOptions<Self> + Serialize + for<'de> Deserialize<'de> + Sync + Send + Clone + 'static[src]

type Action: Serialize + for<'de> Deserialize<'de> + Trans + Sync + Send + Clone + 'static[src]

type Event: Serialize + for<'de> Deserialize<'de> + Trans + Sync + Send + Clone + 'static[src]

type PlayerView: Serialize + for<'de> Deserialize<'de> + Trans + Sync + Send + Clone + 'static[src]

type Results: Serialize + for<'de> Deserialize<'de> + Sync + Send + Clone + 'static[src]

type DebugData: Serialize + for<'de> Deserialize<'de> + Trans + Sync + Send + Clone + 'static[src]

type DebugState: Serialize + for<'de> Deserialize<'de> + Trans + Sync + Send + Clone + 'static[src]

Loading content...

Required methods

pub fn init(
    rng: &mut dyn RngCore,
    player_count: usize,
    options: Self::Options
) -> Self
[src]

pub fn player_view(&self, player_index: usize) -> Self::PlayerView[src]

pub fn process_turn(
    &mut self,
    rng: &mut dyn RngCore,
    actions: HashMap<usize, Self::Action>
) -> Vec<Self::Event>

Notable traits for Vec<u8, Global>

impl Write for Vec<u8, Global>
[src]

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

pub fn results(&self) -> Self::Results[src]

Loading content...

Implementors

Loading content...