コード例 #1
0
ファイル: Board.cs プロジェクト: Gnom01/Chess
        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);
        }