Example #1
0
    void BuildCriticalMove(ChessBoard board)
    {
        var tempBuild = new BuildedData();


        for (int i = 0; i < SequenceCount; ++i)
        {
            var single = this[i];
            for (int j = 0; j < single.Count; ++j)
            {
                var action = owner.MoveTo(single[j]);


                tempBuild.Rebuild(board);


                if (tempBuild.IsChecked(owner.Team))
                {
                    single.RemoveAt(j);
                    j -= 1;
                }

                action.Undo();
            }
        }
    }