use std::time::Duration;
use crate::ecs::ECS;
#[cfg(target_arch = "wasm32")]
use wasm_bindgen::prelude::*;
pub trait GameHandler {
fn start_game(&mut self);
fn next(&mut self, dt: Duration);
fn ecs(&self) -> &ECS;
fn debug_str(&self) -> Option<String>;
fn handle_key(&mut self, key: Key, pressed: bool) -> bool;
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
pub enum Key {
Left,
Right,
Up,
Down,
Space,
Escape,
Q,
}