mod activities; mod game; use activities::Activity; use comfy::*; const GAME_NAME: &str = "Powercreep"; #[derive(Debug)] struct State { activity: Activity } impl Default for State { fn default() -> Self { Self { activity: Activity::House } } } impl GameLoop for State { fn new(_c: &mut EngineState) -> Self { Self::default() } fn update(&mut self, engine: &mut EngineContext) { game::update(self, engine); game::draw(self, engine); } } fn config(config: GameConfig) -> GameConfig { config } async fn run() { init_game_config(GAME_NAME.to_string(), env!("CARGO_PKG_VERSION"), config); let mut engine = EngineState::new(); let game = State::new(&mut engine); run_comfy_main_async(game, engine).await; } fn main() { pollster::block_on(run()); }