private uint FindActionTreeNodeIdx(StrategyTree tree, long sNodeIdx, long aNodeIdx, int hintChildIdx) { long actionTreeIdx = _at.FindChildByAmount(aNodeIdx, tree.Nodes[sNodeIdx].Amount, _init.AtChildrenIndex, hintChildIdx); if (actionTreeIdx == -1) { throw new ApplicationException(String.Format("Cannot find action tree node, strategy node {0}", sNodeIdx)); } return((uint)actionTreeIdx); }
private long FindActionTreeNodeIdx(StrategyTree tree, long sNodeIdx, long aNodeIdx, int hintChildIdx) { long actionTreeIdx = ActionTree.FindChildByAmount(aNodeIdx, tree.Nodes[sNodeIdx].Amount, _actionTreeIndex, hintChildIdx); if (actionTreeIdx == -1) { throw new ApplicationException( String.Format("Cannot find action tree node for player {0}, strategy node {1}", _curPlayer, sNodeIdx)); } return(actionTreeIdx); }