本文整理汇总了C#中HREngine.Bots.Playfield.isEqualf方法的典型用法代码示例。如果您正苦于以下问题:C# Playfield.isEqualf方法的具体用法?C# Playfield.isEqualf怎么用?C# Playfield.isEqualf使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HREngine.Bots.Playfield
的用法示例。
在下文中一共展示了Playfield.isEqualf方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: restoreBestMoves
//queque stuff (done by xytrix)
// Looks through a list of playfields from previous moves to find one that matches our current board state.
// If any is found, we "rollback" our bestactions list to that point in time.
public bool restoreBestMoves(Playfield currentField, List<Playfield> oldMoveGuesses)
{
for (int i = oldMoveGuesses.Count - 1; i >= 0; i--) // work backwards
{
if (currentField.isEqualf(oldMoveGuesses[i]))
{
// We need to re-queue moves from this point. So re-populate the "bestActions" list.
for (int j = oldMoveGuesses.Count - 1; j > i; j--)
{
this.bestActions.Insert(0, oldMoveGuesses[j].playactions.Last());
}
this.nextMoveGuess = oldMoveGuesses[i];
this.bestmove = nextMoveGuess.playactions.LastOrDefault(); // null if empty (i.e. no moves performed)
return true;
}
}
return false;
}