public Card(Rank rank, Suit suit) { this.rank = rank; this.suit = suit; }
public Card(Suit suit, Rank rank) { this.suit = suit; this.rank = rank; }
public Card() { rank = Rank.Ace; suit = Suit.Spades; }
/// <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); }