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); }
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 + "]"); }
public void ChangeLastCardColor(CardColor color) { lastDiscardedCard.ChangeColor(color.GetColor()); }
private void Start() { image.color = color.GetColor(); }