public static Situation evaluateSituation(Image tableImage, Table table, List <TableControl> controls, double bigblind) { // street StreetTypes street = getStreetType(table); // hand HandAnalysis analysis = HandEvaluator.evalHandSmart(table.Hand, table.Community); // opponents int opponents = (street == StreetTypes.Preflop ? getPreflopNumberOfOpponents(table) : getPostflopNumberOfOpponents(table)); // action OpponentActionTypes action = (street == StreetTypes.Preflop ? getPreflopOpponentAction(tableImage, table, controls, bigblind) : getPostflopOpponentAction(tableImage, table, controls, bigblind)); // position PositionTypes position = (street == StreetTypes.Preflop ? getPreflopPosition(table) : getPostflopPosition(table)); return(new Situation(street, analysis.HandSmart, analysis.Chance, opponents, action, position)); }
public static void Main(string[] args) { string hand = "qh kc"; string board = "qs 7c qc 8d 8s"; HandAnalysis analysis = HandEvaluator.evalHandSmart(CardParser.parse(hand), CardParser.parse(board)); Console.WriteLine("chance = " + analysis.Chance); Console.WriteLine("basic = " + analysis.HandBasic); Console.WriteLine("smart = " + analysis.HandSmart); List <Rule> rules = RulesReader.readRules(); RuleEvaluator eval = new RuleEvaluator(rules); Rule rule = eval.findRule(StreetTypes.Turn, HandTypes.Top_pair, ChanceTypes.Draws, 4, OpponentActionTypes.Check, PositionTypes.Early, 0.5, 0.7); Console.WriteLine(rule.Decision); Console.ReadKey(); }
public static void Main(string[] args) { // preflop { string hand = "kh as"; string board = ""; HandAnalysis analysis = HandEvaluator.evalHandSmart(CardParser.parse(hand), CardParser.parse(board)); Console.WriteLine("chance = " + analysis.Chance); Console.WriteLine("basic = " + analysis.HandBasic); Console.WriteLine("smart = " + analysis.HandSmart); } // postflop { string hand = "qh kc"; string board = "qs 7c qc 8d 8s"; HandAnalysis analysis = HandEvaluator.evalHandSmart(CardParser.parse(hand), CardParser.parse(board)); Console.WriteLine("chance = " + analysis.Chance); Console.WriteLine("basic = " + analysis.HandBasic); Console.WriteLine("smart = " + analysis.HandSmart); Console.ReadKey(); } }
public static void Main(string[] args) { string hand = "2d 2s"; string board = "9d 2h 7s 9s Ts"; StreetTypes street = StreetTypes.River; int opps = 1; OpponentActionTypes action = OpponentActionTypes.Raise; double maxBet = 1.26; double potSize = 0.64; HandAnalysis analysis = HandEvaluator.evalHandSmart(CardParser.parse(hand), CardParser.parse(board)); Console.WriteLine("chance = " + analysis.Chance); Console.WriteLine("basic = " + analysis.HandBasic); Console.WriteLine("smart = " + analysis.HandSmart); List <Rule> rules = RulesReader.readRules(); RuleEvaluator eval = new RuleEvaluator(rules); Rule rule = eval.findRule(street, analysis.HandSmart, analysis.Chance, opps, action, PositionTypes.Early, maxBet, potSize); Console.WriteLine("rule = " + rule.Decision); Console.ReadKey(); }