generated from GarandPLG/rust-flake-template
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:
1 parent
a04264c08b
commit
06a439ff88
20 files changed
+242
-140
No files matched your search
@@ -1,4 +1,4 @@
|
||||
use crate::app::states::Players;
|
||||
use crate::app::states::{Players, skirmish_states::units::Unit};
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub struct MinerUnit {
|
||||
@@ -9,8 +9,14 @@ impl MinerUnit {
|
||||
pub fn new(owner: Players) -> Self {
|
||||
Self { owner }
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_tag(self) -> char {
|
||||
impl Unit for MinerUnit {
|
||||
fn get_owner(&self) -> Players {
|
||||
self.owner
|
||||
}
|
||||
|
||||
fn get_tag(&self) -> char {
|
||||
'M'
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user