public void Arrange(PokerPlayer player) { this.Copy(player); if (CheckIsRoyalFlush()) { this.Category = HandCategory.RoyalFlush; } else if (CheckIsFourOfAKind()) { this.Category = HandCategory.FourOfAKind; } else if (CheckIsStraightFlush()) { this.Category = HandCategory.StraightFlush; } else if (CheckIsFullHouse()) { this.Category = HandCategory.FullHouse; } else if (CheckIsFlush()) { this.Category = HandCategory.Flush; } else if (CheckIsStraight()) { this.Category = HandCategory.Straight; } else if (CheckIsThreeOfAKind()) { this.Category = HandCategory.ThreeOfaKind; } else if (CheckIsTwoPair()) { this.Category = HandCategory.TwoPair; } else if (CheckIsPair()) { this.Category = HandCategory.OnePair; } else { this.Category = HandCategory.HighCard; } //Get Score to get High Card this.Score = this.CardsOnHand.AsEnumerable().Sum(r => (int)r.Rank); }
public override void GivePlayingCards(PokerPlayer player, PlayingCard card) { player.ReceivePlayingCard(card); }
public abstract void AddPlayer(PokerPlayer player);
public abstract void GivePlayingCards(PokerPlayer player, PlayingCard card);
private void Copy(PokerPlayer player) { this.Name = player.Name; this.CardsOnHand = player.CardsOnHand; }