pub struct SingleFight {
pub winner_id: PlayerId,
pub fighter_a: Option<Fighter>,
pub fighter_b: Option<Fighter>,
pub actions: Vec<FightAction>,
}Expand description
This is a single fight between two fighters, which ends when one of them is at <= 0 health
Fields§
§winner_id: PlayerIdThe ID of the player, that won.
fighter_a: Option<Fighter>The stats of the first fighter. Typically the player, if the fight was started by them
fighter_b: Option<Fighter>The stats of the first fighter
actions: Vec<FightAction>The action this fight involved. Note that this will likely be changed in the future, as is it hard to interpret
Trait Implementations§
Source§impl Clone for SingleFight
impl Clone for SingleFight
Source§fn clone(&self) -> SingleFight
fn clone(&self) -> SingleFight
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SingleFight
impl Debug for SingleFight
Source§impl Default for SingleFight
impl Default for SingleFight
Source§fn default() -> SingleFight
fn default() -> SingleFight
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for SingleFight
impl<'de> Deserialize<'de> for SingleFight
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for SingleFight
impl RefUnwindSafe for SingleFight
impl Send for SingleFight
impl Sync for SingleFight
impl Unpin for SingleFight
impl UnwindSafe for SingleFight
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