pub struct Player {
pub id: isize,
pub score: usize,
/* private fields */
}
Fields§
§id: isize
§score: usize
Implementations§
Source§impl Player
impl Player
pub fn new(id: isize) -> Player
pub fn hand_count(&self) -> usize
pub fn give(&mut self, card: Card)
pub fn give_all(&mut self, cards: Vec<Card>)
pub fn has(&self, card: &Card) -> bool
pub fn has_any(&self, cards: &Vec<Card>) -> bool
pub fn has_all(&self, cards: &Vec<Card>) -> bool
pub fn take(&mut self, card: Card) -> Option<Card>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Player
impl RefUnwindSafe for Player
impl Send for Player
impl Sync for Player
impl Unpin for Player
impl UnwindSafe for Player
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