Example #1
0
        private void Creat()
        {
            CardQueue = new Queue <CardDto>();
            //创建普通的牌
            for (int color = CardColor.SPADE; color <= CardColor.SQUARE; color++)
            {
                for (int weight = CardWeight.THREE; weight <= CardWeight.TWO; weight++)
                {
                    string  cardName = CardColor.GetColor(color) + CardWeight.GetWeight(weight);
                    CardDto dto      = new CardDto(cardName, color, weight);
                    CardQueue.Enqueue(dto);
                }
            }
            CardDto sJoker = new CardDto("SJoker", CardColor.NONE, CardWeight.SJOKER);
            CardDto lJoker = new CardDto("LJoker", CardColor.NONE, CardWeight.LJOKER);

            CardQueue.Enqueue(sJoker);
            CardQueue.Enqueue(lJoker);
        }
Example #2
0
        public virtual void Dump()
        {
            string val = _value.GetValue().ToString();

            if (val.Contains("11"))
            {
                val = "Jack";
            }
            else if (val.Contains("12"))
            {
                val = "Queen";
            }
            else if (val.Contains("13"))
            {
                val = "King";
            }
            else if (val.Contains("14"))
            {
                val = "Ace";
            }
            System.Console.WriteLine("[" + _color.GetColor() + "] - [" + val + "]");
        }
Example #3
0
 public void ChangeLastCardColor(CardColor color)
 {
     lastDiscardedCard.ChangeColor(color.GetColor());
 }
Example #4
0
 private void Start()
 {
     image.color = color.GetColor();
 }