private List <Card> GetCards(FlopBoard flopBoard, HoldingHoles heroHoles) { return(new List <Card>() { flopBoard.Flop1, flopBoard.Flop2, flopBoard.Flop3, heroHoles.Hole1, heroHoles.Hole2 }); }
private GridStatusInBoardRange TestGrid(FlopBoard flopBoard, RangeGrid grid) { var result = new GridStatusInBoardRange(grid.Category); var rankTester = GetGridRankTester(flopBoard); var rankResult = rankTester.Invoke(grid); result.RankWiseStatus = rankResult; switch (result.Category) { case GridCategoryEnum.Suited: result.SuitedStatus = GetSuitedTester(flopBoard).Invoke(grid); break; case GridCategoryEnum.Paired: result.PairedStatus = GetPairedTester(flopBoard).Invoke(grid); break; case GridCategoryEnum.Offsuit: result.OffsuitStatus = GetOffsuitTester(flopBoard).Invoke(grid); break; } return(result); }
public bool ShouldAGridFoldToBoardByRank(RangeGrid grid, FlopBoard flopBoard) { switch (flopBoard.RankTexture) { case FlopBoardRankTextureEnum.ThreeSome: return(new ThreeSomeRankTexture(flopBoard).ShouldAGridFoldToBet(grid)); case FlopBoardRankTextureEnum.HighPair: return(new HighPairRankTexture(flopBoard).ShouldAGridFoldToBet(grid)); case FlopBoardRankTextureEnum.LowPair: return(new LowPairRankTexture(flopBoard).ShouldAGridFoldToBet(grid)); case FlopBoardRankTextureEnum.Singles: return(new SinglesRankTexture(flopBoard).ShouldAGridFoldToBet(grid)); } throw new NotImplementedException(); }
private BoardRangeGridStatusEnum TestGrid(FlopBoard flopBoard, RangeGrid grid) { switch (flopBoard.RankTexture) { case FlopBoardRankTextureEnum.ThreeSome: return(new ThreeSomeRankTexture(flopBoard).TestGridAgainstFlopBoard(grid)); case FlopBoardRankTextureEnum.HighPair: return(new HighPairRankTexture(flopBoard).TestGridAgainstFlopBoard(grid)); case FlopBoardRankTextureEnum.LowPair: return(new LowPairRankTexture(flopBoard).TestGridAgainstFlopBoard(grid)); case FlopBoardRankTextureEnum.Singles: return(new SinglesRankTexture(flopBoard).TestGridAgainstFlopBoard(grid)); } throw new NotImplementedException(); }
private Func <RangeGrid, BoardRangeGridStatusEnum> GetGridRankTester(FlopBoard flopBoard) { switch (flopBoard.RankTexture) { case FlopBoardRankTextureEnum.ThreeSome: return(new ThreeSomeRankTexture(flopBoard).TestGridAgainstFlopBoard); case FlopBoardRankTextureEnum.HighPair: return(new HighPairRankTexture(flopBoard).TestGridAgainstFlopBoard); case FlopBoardRankTextureEnum.LowPair: return(new LowPairRankTexture(flopBoard).TestGridAgainstFlopBoard); case FlopBoardRankTextureEnum.Singles: return(new SinglesRankTexture(flopBoard).TestGridAgainstFlopBoard); default: throw new NotImplementedException(); } }
public Dictionary <Tuple <SuitEnum, SuitEnum>, bool> ShouldAGridFoldToBoardBySuit(RangeGrid grid, FlopBoard flopBoard, HoldingHoles heroHoles) { var conflictCards = new List <Card>() { heroHoles.Hole1, heroHoles.Hole2, flopBoard.Flop1, flopBoard.Flop2, flopBoard.Flop3 }; grid.EliminateConflicts(conflictCards); switch (flopBoard.SuitTexture) { case FlopBoardSuitTextureEnum.SuitedThree: return(new SuitedThreeSuitTexture(flopBoard).ShouldAGridFoldToBet(grid)); case FlopBoardSuitTextureEnum.SuitedTwo: return(new SuitedTwoSuitTexture(flopBoard).ShouldAGridFoldToBet(grid)); case FlopBoardSuitTextureEnum.Rainbow: return(new RainbowSuitTexture().ShouldAGridFoldToBet(grid)); default: throw new InvalidOperationException(); } }
private PlayerRange SqueezeOnCheck(PlayerRange previousRange, Move lastMove, int bigBlindSize, FlopBoard flopBoard, HoldingHoles heroHoles) { return(_playerRangeSqueezer.Squeeze(previousRange, grid => TestGrid(flopBoard, grid), TestOutcomeOnCheck, GetCards(flopBoard, heroHoles))); }
private Func <RangeGrid, OffsuitStatus <BoardRangeGridStatusEnum> > GetOffsuitTester(FlopBoard flopBoard) { switch (flopBoard.SuitTexture) { case FlopBoardSuitTextureEnum.SuitedThree: return(new SuitedThreeSuitTexture(flopBoard).TestOffsuitGrid); case FlopBoardSuitTextureEnum.SuitedTwo: return(new SuitedTwoSuitTexture(flopBoard).TestOffsuitGrid); case FlopBoardSuitTextureEnum.Rainbow: return(new RainbowSuitTexture().TestOffsuitGrid); default: throw new NotImplementedException(); } }
public PlayerRange Squeeze(PlayerRange previousRange, Move lastMove, int bigBlindSize, FlopBoard flopBoard, HoldingHoles heroHoles) { Logger.Instance.Log($"Squeezing {lastMove.Player.Name}'s range based on his {lastMove.Decision.DecisionType} with {lastMove.Decision.ChipsAdded} chips"); switch (lastMove.Decision.DecisionType) { case DecisionType.AllIn: case DecisionType.AllInRaise: case DecisionType.Raise: case DecisionType.Reraise: return(SqueezeOnRaise(previousRange, lastMove, bigBlindSize, flopBoard, heroHoles)); case DecisionType.Ante: return(previousRange); case DecisionType.Call: return(SqueezeOnCall(previousRange, lastMove, bigBlindSize, flopBoard, heroHoles)); case DecisionType.Check: return(SqueezeOnCheck(previousRange, lastMove, bigBlindSize, flopBoard, heroHoles)); default: throw new InvalidOperationException($"{lastMove.Decision.DecisionType} should not show in Preflop Squeeze"); } }
public FlopFiveCardsEnumerator(FlopBoard flopBoard, HoldingHoles heroHoles) { FlopBoard = flopBoard; HeroHoles = heroHoles; }