/// <summary> /// If card can help follower to get ahead of leader /// </summary> /// <param name="leader"></param> /// <param name="follower"></param> /// <param name="card"></param> /// <returns></returns> private bool CardCanHelp(SixCardsHand leader, SixCardsHand follower, Card card) { var leaderSeven = new SevenCardsHand(leader.Hole1, leader.Hole2, leader.Flop1, leader.Flop2, leader.Flop3, leader.Turn, card); var followerSeven = new SevenCardsHand(follower.Hole1, follower.Hole2, follower.Flop1, follower.Flop2, follower.Flop3, follower.Turn, card); var leaderBest = BettingUtils.FindBestFive(leaderSeven); var followerBest = BettingUtils.FindBestFive(followerSeven); var leaderScore = BettingUtils.GetScoreForFiveCardHand(leaderBest); var followerScore = BettingUtils.GetScoreForFiveCardHand(followerBest); return(followerScore > leaderScore); }
private void CompareOnRiver() { var heroSeven = new SevenCardsHand(HeroHoles.Hole1, HeroHoles.Hole2, BoardStatus.Flop1, BoardStatus.Flop2, BoardStatus.Flop3, BoardStatus.Turn, BoardStatus.River); var villainSeven = new SevenCardsHand(VillainHoles.Hole1, VillainHoles.Hole2, BoardStatus.Flop1, BoardStatus.Flop2, BoardStatus.Flop3, BoardStatus.Turn, BoardStatus.River); var heroBest = BettingUtils.FindBestFive(heroSeven); var villainBest = BettingUtils.FindBestFive(villainSeven); var heroScore = BettingUtils.GetScoreForFiveCardHand(heroBest); var villainScore = BettingUtils.GetScoreForFiveCardHand(villainBest); HeroIsAhead = heroScore > villainScore; }