use bevy::prelude::*;

use super::Board;

#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Component, Resource)]
pub enum LevelSize {
    Size5x5,
    Size10x5,
    Size10x10,
    Size15x10,
    Size15x15,
}

impl LevelSize {

    pub fn board(&self, with_hints: bool) -> Board {
        match self {
            LevelSize::Size5x5 => Board::new::<5, 5>(with_hints),
            LevelSize::Size10x5 => Board::new::<10, 5>(with_hints),
            LevelSize::Size10x10 => Board::new::<10, 10>(with_hints),
            LevelSize::Size15x10 => Board::new::<15, 10>(with_hints),
            LevelSize::Size15x15 => Board::new::<15, 15>(with_hints),
        }
    }
}
