Example #1
0
 public Suit(int suitIndex, int suitVal)        //specific Suit and Rank Value
 {
     mySuit  = ((SuitType)suitIndex);
     sName   = mySuit.ToString();
     sValue  = suitVal;
     sSymbol = InitSymbol();
 }
Example #2
0
 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();
 }
Example #3
0
        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);
        }
Example #4
0
        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);
        }
Example #5
0
        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);
        }
Example #6
0
 public string DisplayValue()
 {
     return($"{Suit.ToString()} {Value} {High.ToString()}");
 }
Example #7
0
 public string ShowCard()
 {
     return(_suit.ToString() + "_" + _number.ToString());
 }
Example #8
0
 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;
 }