use crate::game::Player;
use ratatui::style::Color;
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub struct Theme {
pub background: Color,
pub board: Color,
pub board_highlight: Color,
pub board_border: Color,
pub hole: Color,
pub red_disc: Color,
pub yellow_disc: Color,
pub title: Color,
pub text: Color,
pub muted: Color,
pub notice: Color,
}
impl Theme {
pub const fn disc(&self, player: Player) -> Color {
match player {
Player::Red => self.red_disc,
Player::Yellow => self.yellow_disc,
}
}
}
impl Default for Theme {
fn default() -> Self {
Self {
background: Color::Reset,
board: Color::Blue,
board_highlight: Color::LightBlue,
board_border: Color::LightBlue,
hole: Color::Black,
red_disc: Color::LightRed,
yellow_disc: Color::LightYellow,
title: Color::White,
text: Color::Gray,
muted: Color::DarkGray,
notice: Color::LightMagenta,
}
}
}