| 415 | } |
| 416 | |
| 417 | shared_ptr<ChanceNode> |
| 418 | GameTree::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 | |
| 429 | shared_ptr<ShowdownNode> GameTree::generateShowdownNode(json meta, string round, shared_ptr<GameTreeNode> parent) { |
| 430 | json meta_payoffs = meta["payoffs"]; |
no test coverage detected