MCPcopy Create free account
hub / github.com/bupticybee/TexasSolver / generateChanceNode

Method generateChanceNode

src/GameTree.cpp:417–427  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

415}
416
417shared_ptr<ChanceNode>
418GameTree::generateChanceNode(json meta, const json& child, string round, shared_ptr<GameTreeNode> parent) {
419 //节点上的下注额度
420 double pot = meta["pot"];
421 shared_ptr<GameTreeNode> one_child = recurrentGenerateTreeNode(child, nullptr);
422 GameTreeNode::GameRound game_round = strToGameRound(std::move(round));
423 shared_ptr<ChanceNode> chanceNode = make_shared<ChanceNode>(one_child,game_round,pot,parent,this->deck.getCards());
424 shared_ptr<GameTreeNode> gameTreeNode = chanceNode->getChildren();
425 gameTreeNode->setParent(chanceNode);
426 return chanceNode;
427}
428
429shared_ptr<ShowdownNode> GameTree::generateShowdownNode(json meta, string round, shared_ptr<GameTreeNode> parent) {
430 json meta_payoffs = meta["payoffs"];

Callers 1

Calls 2

getChildrenMethod · 0.80
setParentMethod · 0.80

Tested by

no test coverage detected