Struct onejoker::cards::master_deck::MasterDeck
source · pub struct MasterDeck {
pub name: &'static str,
pub card_set: u64,
pub card_list: &'static [Card],
pub dups_allowed: bool,
pub low_aces: bool,
}
Expand description
wiki | A new full deck of cards
A static object that describes the properties of a new deck of cards for a certain game or set of games. For example, the “English” master deck has 52 cards, no jokers, aces are high, and no duplicate cards are allowed. The “Canasta” deck has 108 cards including jokers and duplicates.
Since this is all unchanging information, MasterDeck::new()
just returns a pointer to an existing static object based on the name you
pass in.
Fields§
§name: &'static str
Canonical name of deck
card_set: u64
Bitset of cards in deck for quick lookup
card_list: &'static [Card]
List of cards in full deck
dups_allowed: bool
Are duplicate cards allowed?
low_aces: bool
Are aces low?
Implementations§
source§impl MasterDeck
impl MasterDeck
Trait Implementations§
source§impl Clone for MasterDeck
impl Clone for MasterDeck
source§fn clone(&self) -> MasterDeck
fn clone(&self) -> MasterDeck
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 moresource§impl Debug for MasterDeck
impl Debug for MasterDeck
source§impl Display for MasterDeck
impl Display for MasterDeck
source§impl Hash for MasterDeck
impl Hash for MasterDeck
source§impl PartialEq for MasterDeck
impl PartialEq for MasterDeck
source§fn eq(&self, other: &MasterDeck) -> bool
fn eq(&self, other: &MasterDeck) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Copy for MasterDeck
impl Eq for MasterDeck
impl StructuralPartialEq for MasterDeck
Auto Trait Implementations§
impl Freeze for MasterDeck
impl RefUnwindSafe for MasterDeck
impl Send for MasterDeck
impl Sync for MasterDeck
impl Unpin for MasterDeck
impl UnwindSafe for MasterDeck
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
source§impl<T> CloneToUninit for Twhere
T: Copy,
impl<T> CloneToUninit for Twhere
T: Copy,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)