public void SetRank(string rank) { switch (rank) { case "two": this.ranks = RANKS.two; break; case "three": this.ranks = RANKS.three; break; case "four": this.ranks = RANKS.four; break; case "five": this.ranks = RANKS.five; break; case "six": this.ranks = RANKS.six; break; case "seven": this.ranks = RANKS.seven; break; case "eight": this.ranks = RANKS.eight; break; case "nine": this.ranks = RANKS.nine; break; case "ten": this.ranks = RANKS.ten; break; case "jack": this.ranks = RANKS.jack; break; case "queen": this.ranks = RANKS.queen; break; case "king": this.ranks = RANKS.king; break; case "ace": this.ranks = RANKS.ace; break; } }
private void MakeDeck() { deckOfCards = new Queue <Card>(36); for (SUITS suit = SUITS.HEARTS; suit <= SUITS.SPADES; ++suit) { for (RANKS rank = RANKS.SIX; rank <= RANKS.ACE; ++rank) { deckOfCards.Enqueue(new Card(suit, rank)); } } }
public Card(SUITS suit, RANKS rank) { this.suit = suit; this.rank = rank; }