public int Stand() { int sum = SumHand(Dealer); while (sum < 17) { Dealer.Add(Deck.Draw()); sum = SumHand(Dealer); } return(sum); }
public override void Enter() { m_Owner.UIController.SetResultText(""); Card[] cards = m_Owner.Players[0].Clear(true); cards = cards.Concat(m_Owner.Players[1].Clear(true)).ToArray(); cards = cards.Concat(m_Owner.DealerTable.Clear(true)).ToArray(); foreach (Card c in cards) { if (c == null) { break; } Dealer.Add(new Card(c.Number)); } foreach (PlayerTable p in m_Owner.Players) { p.SetHand(""); } StartCoroutine(DelayedStart()); }