pub struct RoundPlayer { /* private fields */ }
Implementations§
Source§impl RoundPlayer
impl RoundPlayer
pub fn new(player: &Player, round_start_info: &RoundStartInfo) -> Self
pub fn player_number(&self) -> PlayerNumber
pub fn health(&self) -> i32
pub fn stun_state(&self) -> StunState
pub fn take_damage(&mut self, sawn: bool) -> bool
pub fn gain_health(&mut self, amount: u8)
pub fn stun(&mut self) -> Result<(), AlreadyStunnedError>
Sourcepub fn update_stunned(&mut self) -> bool
pub fn update_stunned(&mut self) -> bool
Updates the player’s stun_state and returns true if the player can take their turn. Should only be called once prior to the player’s turn
Trait Implementations§
Source§impl Clone for RoundPlayer
impl Clone for RoundPlayer
Source§fn clone(&self) -> RoundPlayer
fn clone(&self) -> RoundPlayer
Returns a copy 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 moreAuto Trait Implementations§
impl Freeze for RoundPlayer
impl RefUnwindSafe for RoundPlayer
impl Send for RoundPlayer
impl Sync for RoundPlayer
impl Unpin for RoundPlayer
impl UnwindSafe for RoundPlayer
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