示例#1
0
        public Board Move(FigureMoving fm)
        {
            Board next = new Board(Fen);

            Figure figure = (fm.Promotion == Figure.none) ? fm.Figure : fm.Promotion;

            next.SetFigureAt(fm.From, Figure.none); //remove the figure from the previous square
            next.SetFigureAt(fm.To, figure);        //set new figure on the correspoding square

            next.MoveColor = MoveColor.FlipColor();

            next.GenerateFen();

            return(next);
        }