예제 #1
0
        // For realize moving
        public Board Move(FigureMoving fm)
        {
            var next = new Board(Fen);

            next.SetFigureAt(fm.From, Figure.none);
            next.SetFigureAt(fm.To, CheckingOnPromotion(fm));

            ChangingMoveNumberAndFlipColor(next);
            next.GenerateFen();
            return(next);
        }
예제 #2
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);
        }
예제 #3
0
파일: Board.cs 프로젝트: ssauew/game_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);
        }
예제 #4
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);
        }