public Enums.PlayAction DetermineCorrectPlayAction(HandInformation handInformation, uint dealerUpCard) { Enums.PlayAction result; if (handInformation.IsSplitable) { result = DoSplitRules(handInformation.Cards[0], dealerUpCard); } else if (handInformation.IsSoft) { result = DoSoftRules(handInformation.HandValue, dealerUpCard); } else { result = DoHardRules(handInformation.HandValue, dealerUpCard); } if (!handInformation.OkayToDouble && result == Enums.PlayAction.Double) { result = Enums.PlayAction.Stand; } return result; }
public void SetNewHand(uint[] cards) { Hand = new HandInformation(isDealerHand: true); Hand.Cards.AddRange(cards); }
public PlayersHands() { Hands = new HandInformation[2]; Hands[0] = new HandInformation(isDealerHand: false); Hands[1] = new HandInformation(isDealerHand: false); }