use std::fmt::Display;

use serde::Deserialize;

pub mod direction;
pub mod drops;
pub mod enemy;
pub mod materials;
pub mod synthesis;

#[derive(Debug, Clone, Default, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub struct GameProps {
	is_final_mix: bool,
}

impl GameProps {
	pub fn final_mix() -> Self {
		Self {
			is_final_mix: true,
			..Default::default()
		}
	}
}

#[derive(Debug, Clone, Deserialize, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub enum Game {
	Kh1(GameProps),
	Kh2(GameProps),
	Kh3,
	Bbs,
	Ddd,
}

impl Display for Game {
	fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
		let str = match self {
			Game::Kh1(_) => "kh1",
			Game::Kh2(_) => "kh2",
			Game::Kh3 => "kh3",
			Game::Bbs => "bbs",
			Game::Ddd => "ddd",
		};

		f.write_str(str)
	}
}
