//! Configuration primitives.

/// Configures a graphical application.
pub struct GraphicalApplicationOptions {
    pub tick_rate: f64,
    pub width: u32,
    pub height: u32,
}

impl GraphicalApplicationOptions {
    pub fn with_tick_rate(&mut self, tick_rate: f64) -> &mut Self {
        self.tick_rate = tick_rate;

        self
    }

    pub fn with_size(&mut self, width: u32, height: u32) -> &mut Self {
        self.width = width;
        self.height = height;

        self
    }
}

impl Default for GraphicalApplicationOptions {
    fn default() -> Self {
        let tick_rate = 1.;
        let width = 1200;
        let height = 800;

        Self { tick_rate, width, height }
    }
}
