pub struct Attack {
attacks_per_match: Vec<PerMatch>,
}Fields§
§attacks_per_match: Vec<PerMatch>Implementations§
Source§impl Attack
impl Attack
Sourcepub fn new_empty() -> Self
pub fn new_empty() -> Self
Use this to create a new attack message, then add attacks to it using with_attack or push_attack.
pub fn is_empty(&self) -> bool
fn coord_to_arr(coord: Coord) -> [usize; 2]
pub fn with_attack( self, matchup: (PlayerId, PlayerId), current_fight_round: u64, attack: SingleAttack, ) -> Self
pub fn push_attack( &mut self, matchup: (PlayerId, PlayerId), current_fight_round: u64, attack: SingleAttack, ) -> &mut Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Attack
impl RefUnwindSafe for Attack
impl Send for Attack
impl Sync for Attack
impl Unpin for Attack
impl UnwindSafe for Attack
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more