pub struct Config {
pub width: u32,
pub height: u32,
pub gravity: f64,
pub flap_speed: f64,
pub pipe_width: u32,
pub pipe_interval: u32,
pub pipe_mouth_height: u32,
pub pipe_speed: f64,
}
impl Default for Config {
fn default() -> Self {
Self {
width: 80,
height: 24,
gravity: 0.005,
#[allow(deprecated)]
flap_speed: 0.2,
pipe_width: 5,
pipe_interval: 40,
pipe_mouth_height: 10,
pipe_speed: 0.3,
}
}
}
use lazy_static::lazy_static;
lazy_static! {
pub static ref CONFIG: Config = Config::default();
}