public Node CreateTree(int currentRoundNumber) { Node rootNode = new Node(null, string.Empty); string[] paths = new PathGenerator().GeneratePaths(currentRoundNumber); double[] expectedValues = GetEVs(paths, _street, _player, _settings); PathConstructor pathConstructor = new PathConstructor(_data, _player.IsSmallBlind); for (int i = 0; i < paths.Length; i++) { pathConstructor.ConstructPath(rootNode, paths[i], expectedValues[i]); } return(rootNode); }
private List <Tuple <string, double> > CreateFullTreePath() { PathGenerator ph = new PathGenerator(); string[] paths = ph.GeneratePaths(_round); List <Tuple <string, double> > result = new List <Tuple <string, double> >(); StringBuilder sb = new StringBuilder(); foreach (string path in paths) { result.Add(new Tuple <string, double>(path, 1)); sb.AppendLine(path + ",1"); } textBox1.Text = sb.ToString(); return(result); }
private Node CreateTree(List <Card> street, Player player, Settings settings, int currentRoundNumber) { Node result = new Node(null, string.Empty); PathGenerator pg = new PathGenerator(); PathConstructor ph = new PathConstructor(_data, _isSmallBlind); List <Card> cardHand = new List <Card> { player.Cards[0], player.Cards[1] }; string[] paths = pg.GeneratePaths(currentRoundNumber); double[] expectedValues = GetEVs(paths, cardHand, street, player, settings); for (int i = 0; i < paths.Length; i++) { ph.ConstructPath(result, paths[i], expectedValues[i]); } return(result); }