Rename buildings module to structures

This commit is contained in:
2026-04-19 20:02:21 +02:00
parent 33088dc29d
commit 0a8b3562f6
8 changed files with 4 additions and 4 deletions
@@ -0,0 +1,34 @@
use ratatui::style::Color;
use crate::app::states::Players;
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub struct BaseBuilding {
owner: Players,
level: u8,
}
impl BaseBuilding {
pub fn new(owner: Players) -> Self {
Self { owner, level: b'1' }
}
pub fn get_tag(&self) -> char {
'B'
}
pub fn get_color(&self) -> Color {
match self.owner {
Players::Player => Color::LightBlue,
Players::Enemy => Color::LightRed,
}
}
pub fn get_owner(&self) -> Players {
self.owner
}
pub fn get_level(&self) -> char {
self.level as char
}
}