本文整理汇总了C#中IBoard.Select方法的典型用法代码示例。如果您正苦于以下问题:C# IBoard.Select方法的具体用法?C# IBoard.Select怎么用?C# IBoard.Select使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IBoard
的用法示例。
在下文中一共展示了IBoard.Select方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Game
public Game(BoardView boardView)
{
m_boardView = boardView;
GameBoardBuilder builder = new GameBoardBuilder ();
AddGameUnity (builder,Point.Make(0,4));
m_logicBoard = builder.GetBoard ();
m_currentSelection = m_logicBoard.Select (Point.Make(-1,-1));
m_boardView.OnCellClicked.Register((x,y) =>{
//TODO: Usar state pattern
var point = Point.Make(x,y);
Debug.Log(point);
if(m_currentSelection.IsEmpty)
{
m_currentSelection = m_logicBoard.Select(point);
}
else
{
var visitor = new WalkVisitor(point);
m_currentSelection.Commands.Visit(visitor);
m_boardView.AddResult(visitor.Result);
m_currentSelection = m_logicBoard.Select (Point.Make(-1,-1));
}
});
}