Esempio n. 1
0
        public Board Move(FigureMoving fm)
        {
            Board next = new Board(fen);

            next.SetFigureAt(fm.from, Figure.none);
            next.SetFigureAt(fm.to, fm.promotion == Figure.none ? fm.figure : fm.promotion);
            if (moveColor == Color.black)
            {
                next.moveNumber++;
            }
            next.moveColor = moveColor.FlipColor();
            next.GenerateFEN();
            return(next);
        }