本文整理汇总了C++中MoveList::GetCombinedMove方法的典型用法代码示例。如果您正苦于以下问题:C++ MoveList::GetCombinedMove方法的具体用法?C++ MoveList::GetCombinedMove怎么用?C++ MoveList::GetCombinedMove使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MoveList
的用法示例。
在下文中一共展示了MoveList::GetCombinedMove方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: BestMoveAfterPard
bool BestMoveAfterPard(
Holding& holding,
DefList& def)
{
int slNew = 0, cNew = 0;
holding.SetRhoNo();
if (! holding.MakePlay(slNew, cNew))
{
const Trick& trick = holding.GetTrick();
def.Set1(trick);
if (debugComplex)
{
DumpStatus(def, "BestMoveAfterPard: Simple play");
holding.PrintPlayNew(cout);
}
return true;
}
assert(slNew >= 1 && slNew <= 12);
assert(cNew >= 0 && cNew < SDS_NUMSINGLES[slNew]);
if (singles[slNew][cNew].moveNo == 0)
{
Holding tmpHolding;
tmpHolding.Set(slNew, cNew);
if (debugComplex)
{
cout << "Start recursing\n";
tmpHolding.Print(cout);
}
DefList deftmp1, deftmp2;
bool newFlag;
MakeComplexSingleMove(tmpHolding, deftmp1, deftmp2);
int sl = tmpHolding.GetSuitLength();
int c = tmpHolding.GetCounter();
// TODO: Does tmpHolding really change in the invocation?
singles[sl][c].moveNo = moveList.AddMoves(
deftmp1, deftmp2, tmpHolding, newFlag);
if (debugComplex)
{
deftmp1.Print(cout);
deftmp2.Print(cout);
cout << "Done recursing\n";
}
}
assert(singles[slNew][cNew].moveNo != 0);
def = moveList.GetCombinedMove(singles[slNew][cNew].moveNo);
if (debugComplex)
{
DumpStatus(def, "BestMoveAfterPard: Stored play count", slNew, cNew);
Holding hTmp;
hTmp.Set(slNew, cNew);
hTmp.Print(cout);
holding.PrintPlayNew(cout);
fflush(stdout);
}
def += holding;
// cout << "After +=, dc " << debugComplex << endl;
if (debugComplex)
DumpStatus(def, "Prepended: Stored play count");
// cout.flush();
return true;
}