private void AdjustHandHistory(HandHistory handHistory, long heroId) { // replace 1st raise with bet ReplaceFirstRaiseWithBet(handHistory.Flop); ReplaceFirstRaiseWithBet(handHistory.Turn); ReplaceFirstRaiseWithBet(handHistory.River); HandHistoryUtils.AddShowActions(handHistory); HandHistoryUtils.AddWinningActions(handHistory); HandHistoryUtils.CalculateBets(handHistory); HandHistoryUtils.CalculateUncalledBets(handHistory, true); HandHistoryUtils.CalculateTotalPot(handHistory); HandHistoryUtils.SortHandActions(handHistory); HandHistoryUtils.RemoveSittingOutPlayers(handHistory); }
protected virtual void AdjustFastFoldHandHistory(HandHistory handHistory) { if (handHistory.HandActions == null || handHistory.HandActions.Count == 0 || handHistory.Players == null || handHistory.Players.Count == 0) { return; } // if hero didn't fold on preflop then do nothing if (handHistory.HandActions.Any(x => x.Street == Street.Preflop && handHistory.HeroName == x.PlayerName && x.IsFold)) { foreach (var player in handHistory.Players) { var playerAction = new HandAction(player.PlayerName, HandActionType.FOLD, 0, Street.Preflop, 0); handHistory.HandActions.Add(playerAction); } } HandHistoryUtils.SortHandActions(handHistory); }