public Suit(int suitIndex, int suitVal) //specific Suit and Rank Value { mySuit = ((SuitType)suitIndex); sName = mySuit.ToString(); sValue = suitVal; sSymbol = InitSymbol(); }
public Suit(int suitIndex) //specific suit with default suit rank C>D>H>S { mySuit = ((SuitType)suitIndex); sName = mySuit.ToString(); // sValue = (int)mySuit; sSymbol = InitSymbol(); }
public static string Translate(SuitType suitType) { string key = string.Format("Suit.{0}.Text", suitType.ToString()); string name = Application.Current.TryFindResource(key) as string; if (name == null) { return(string.Empty); } return(name); }
void DrawLabels(PaintEventArgs e) { Font font = new Font("Verdana", 20); for (int i = 0; i != 8; i++) { e.Graphics.DrawString((8 - i).ToString(), font, Brushes.Black, 8 * resources.SquareDim, i * resources.SquareDim); e.Graphics.DrawString(((char)('A' + i)).ToString(), font, Brushes.Black, i * resources.SquareDim + 5, 8 * resources.SquareDim); } Font font2 = new Font("Verdana", 9); e.Graphics.DrawString("Current turn: " + CurrentTurn.ToString().ToLower(), font2, Brushes.Blue, 10, 9 * resources.SquareDim - 10); }
public void Initialize(SuitType suit, RankType rank) { this.suitType = suit; this.rankType = rank; this.name = rank.ToString() + " OF " + suit.ToString(); if (meshInstance == null) { Awake(); } if (offsetDictionary == null) { EvaluateAtlas(this.textureAtlas); } string suitSprite; GetSpriteName(out suitSprite); SetFace(suitSprite); }
public string DisplayValue() { return($"{Suit.ToString()} {Value} {High.ToString()}"); }
public string ShowCard() { return(_suit.ToString() + "_" + _number.ToString()); }
public static string Translate(SuitType suitType) { string key = string.Format("Suit.{0}.Text", suitType.ToString()); string name = Application.Current.TryFindResource(key) as string; if (name == null) return string.Empty; return name; }