Struct libcoinche::cards::Card
[−]
[src]
pub struct Card(_);
Represents a single card.
Methods
impl Card
fn id(self) -> u32
Returns the card id (from 0 to 31).
fn from_id(id: u32) -> Self
fn rank(self) -> Rank
Returns the card's rank.
fn suit(self) -> Suit
Returns the card's suit.
fn to_string(self) -> String
Returns a string representation of the card (ex: "7♦").
fn new(suit: Suit, rank: Rank) -> Self
Creates a card from the given suit and rank.