/// <summary> /// Description of the card. /// </summary> /// <returns>String with the card inf</returns> public override string ToString() { string value = "{0} {1}"; switch (Color) { case CardColor.Purple: value = String.Format(value, ToStringShort(), Face); break; case CardColor.Wildcard: value = String.Format(value, ToStringShortColor(), Face.ToString()); break; case CardColor.Red: case CardColor.Yellow: case CardColor.Blue: case CardColor.Green: case CardColor.Bionic: // Normal format. value = String.Format(value, Color.ToString(), Face.ToString()); break; } return(value); }
public RepairAction(CardFace face, CriticalCardType?type = null) { damageCardFace = face; criticalCardType = type; DiceModificationName = Name = "Repair 1 " + face.ToString().ToLower() + (type != null ? " " + type.ToString() : "") + " damage"; }
private string CheckCardFace(CardFace cardFace) { string result = ""; if ((int)cardFace <= 10) { return result = ((int)cardFace).ToString(); } else { string cardName = cardFace.ToString(); char firstLetter = cardName[0]; return result = firstLetter.ToString(); } }
public override string ToString() { return("Suite: " + suite.ToString() + "; Face: " + face.ToString()); }
/// <summary> /// to string override to represent a card on console. /// </summary> /// <returns>cardface of suit</returns> public override string ToString() { return(cardFace.ToString() + " of " + suit.ToString()); }
/// <summary>Overridden ToString() function</summary> /// <returns>String representation of a Card</returns> public override string ToString() { return("[" + suit.ToString() + face.ToString() + "]"); }
public override string ToString() { var newString = ($"[{CardFace.ToString()}, {Suit.ToString()}]"); return(newString); }
// Constructor for a Card public Card(CardFace face, CardSuit suit) { Face = face; Suit = suit; Image = Face.ToString() + Suit + ".jpg"; }