Files
war-in-tunnels/src/app/states/skirmish_states/units/miner.rs
T
GarandPLG b639531841 Refactor GameMode and Players into skirmish_states
Move the GameMode and Players enums from the top‑level states module
into the
skirmish_states submodule, add an Unclaimed variant to Players, and
update all
imports, trait implementations, and related logic accordingly. Adjust
the
durability percentage calculation to use u32 for safety.
2026-05-01 19:05:03 +02:00

27 lines
452 B
Rust

use crate::app::states::skirmish_states::{Players, units::Unit};
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub struct MinerUnit {
owner: Players,
}
impl MinerUnit {
pub fn new(owner: Players) -> Self {
Self { owner }
}
}
impl Unit for MinerUnit {
fn get_owner(&self) -> Players {
self.owner
}
fn get_tag(&self) -> char {
'M'
}
fn get_name(&self) -> &'static str {
"Miner"
}
}