tge/game.rs
1use crate::error::GameResult;
2use crate::engine::Engine;
3use crate::event::Event;
4
5pub trait Game {
6 fn update(&mut self, engine: &mut Engine) -> GameResult;
7
8 fn render(&mut self, engine: &mut Engine) -> GameResult;
9
10 fn event(&mut self, _engine: &mut Engine, _event: Event) -> GameResult<bool> {
11 Ok(false)
12 }
13}