Game

Trait Game 

Source
pub trait Game<K, I> {
    // Required methods
    fn world_config(&mut self);
    fn update(&mut self, input: I, shared_state: Arc<Mutex<K>>);
    fn reset_input(&mut self, input: Arc<Mutex<I>>);
    fn render(&mut self);
    fn end_game(&self) -> bool;
}
Expand description

Game definition

Required Methods§

Source

fn world_config(&mut self)

Source

fn update(&mut self, input: I, shared_state: Arc<Mutex<K>>)

Source

fn reset_input(&mut self, input: Arc<Mutex<I>>)

Source

fn render(&mut self)

Source

fn end_game(&self) -> bool

Implementors§