public void Blackjack() { this.Result = Result.Blackjack; var args = new OnCardReceivedEventArgs(this, null); onDealerBlackjack?.Invoke(this, args); }
public void AddCard(Card card) { this.Cards.Add(card); var args = new OnCardReceivedEventArgs(this, card); onCardReceived?.Invoke(this, args); }
private void giveDealerACard() { Card card = this.Shoe.NextCard; Dealer.Hand.Cards.Add(card); var args = new OnCardReceivedEventArgs(Dealer.Hand, card); onDealerCardReceived?.Invoke(this, args); }
public Card RemoveCard(int index) { var result = this.Cards[index]; this.Cards.Remove(result); var args = new OnCardReceivedEventArgs(this, result); onCardReceived?.Invoke(this, args); return(result); }
public override bool CheckIsBust() { if (CurrentScore > 21) { this.Result = Result.Bust; var args = new OnCardReceivedEventArgs(this, null); onDealerBust?.Invoke(this, args); return(true); } else { return(false); } }