コード例 #1
0
ファイル: WellGame.cs プロジェクト: Kamille1989/AlphaBeta
    public IContext NextChoice(ref object move)
    {
        WellGame next = new WellGame(mPlayer);
        for (int i = 0; i < mChess.Length; ++i)
        {
            for (int j = 0; j < mChess[i].Length; ++j)
            {
                next.Step(i, j, mChess[i][j]);
            }
        }
        next.mToggleRole = !mToggleRole;

        Coordinate choice;
        if (BestChoiceGrid(out choice))
        {
            mChoicedList.Add(choice);
            move = choice;
            next.Step(choice.x, choice.y, mToggleRole ? mPlayer : mAI);
        }

        return next;
    }
コード例 #2
0
ファイル: GameLogic.cs プロジェクト: Kamille1989/AlphaBeta
 public void GameStart(WellGame.GridState state)
 {
     game = new WellGame(state);
 }