Beispiel #1
0
 public Card(Rank rank, Suit suit)
 {
     this.rank = rank;
     this.suit = suit;
 }
Beispiel #2
0
 public Card(Suit suit, Rank rank)
 {
     this.suit = suit;
     this.rank = rank;
 }
Beispiel #3
0
 public Card()
 {
     rank = Rank.Ace;
     suit = Suit.Spades;
 }
Beispiel #4
0
 /// <summary>Initializes a new instance of the <see cref="Card" /> class.</summary>
 /// <param name="face">The face of the card.</param>
 /// <param name="suit">The suit of the card.</param>
 /// <exception cref="ArgumentNullException">
 ///     Either <paramref name="face" /> or <paramref name="suit" /> are <value>null</value>.
 /// </exception>
 public Card(Face face, Suit suit)
 {
     this.Face      = face ?? throw new ArgumentNullException(nameof(face));
     this.Suit      = suit ?? throw new ArgumentNullException(nameof(suit));
     this.Indicator = string.Format(CultureInfo.InvariantCulture, "{0}{1}", this.Face.Indicator, this.Suit.Indicator);
 }