Skip to main content

GameState

Trait GameState 

Source
pub trait GameState: 'static {
    // Required method
    fn tick(&mut self, ctx: &mut BTerm);
}
Expand description

Implement this trait on your state struct, so the engine knows what to call on each tick.

Required Methods§

Source

fn tick(&mut self, ctx: &mut BTerm)

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§