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:
GarandPLG committed 2026-04-20 12:17:56 +02:00
1 parent a04264c08b
commit 06a439ff88
20 files changed
+242 -140

No files matched your search

+1 -24
View File
@@ -1,8 +1,4 @@
use crate::app::states::skirmish_states::{
BoardState,
structures::{BaseBuilding, Stone, Tunnel},
units::MinerUnit,
};
use crate::app::states::skirmish_states::BoardState;
use clap::ValueEnum;
#[derive(Debug, Clone, PartialEq, Eq)]
@@ -18,27 +14,8 @@ pub enum GameMode {
FrontLines,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, ValueEnum)]
pub enum ZoomLevel {
ZoomedIn,
Default,
ZoomedOut,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum Players {
Player,
Enemy,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum CellStructure {
Base(BaseBuilding),
Tunnel(Tunnel),
Stone(Stone),
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum Units {
Miner(MinerUnit),
}