Refactor Units enum location and chain CellWidget setters

Move Units enum from the units module into the skirmish state module,
add a dedicated Players enum, and remove the now‑unused unit module.
Update all imports accordingly.
Adjust CellWidget's set_zoom_level and set_structure to return &mut
Self,
enabling method chaining.
This commit is contained in:
2026-04-16 22:02:15 +02:00
parent 6dc5f8605c
commit e6d87dd064
6 changed files with 18 additions and 21 deletions
+9 -4
View File
@@ -1,4 +1,4 @@
use crate::app::{buildings::BaseBuilding, states::skirmish_states::BoardState};
use crate::app::{buildings::BaseBuilding, states::skirmish_states::BoardState, units::MinerUnit};
use clap::ValueEnum;
#[derive(Debug, Clone, PartialEq, Eq)]
@@ -21,6 +21,12 @@ pub enum ZoomLevel {
ZoomedOut,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum Players {
Player,
Enemy,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum CellStructure {
Base(BaseBuilding),
@@ -29,7 +35,6 @@ pub enum CellStructure {
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum Players {
Player,
Enemy,
pub enum Units {
Miner(MinerUnit),
}