Move ZoomLevel into skirmish_states

Introduce Structure and Unit traits with enum wrappers.
Replace old zoom helper with ZoomLevel methods.
Update imports, BoardState, CellWidget, and CLI to use new locations.
This commit is contained in:
2026-04-20 12:17:56 +02:00
parent a04264c08b
commit 06a439ff88
20 changed files with 242 additions and 140 deletions
@@ -0,0 +1,20 @@
use crate::app::states::skirmish_states::units::{MinerUnit, OptionalUnit, Unit};
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum Units {
Miner(MinerUnit),
}
impl Units {
pub fn get_tag(&self) -> char {
match self {
Units::Miner(m) => m.get_tag(),
}
}
}
impl OptionalUnit for Option<Units> {
fn try_get_tag(&self) -> char {
self.map_or(' ', |u| u.get_tag())
}
}