Пример #1
0
        public bool FinallyMove(int x1, int y1, int x2, int y2, Board board, BoardLogic boardLogic, bool print = true)
        {
            PieceBase piece = board.GetPiece(x1, y1);

            if (piece.LogicMove(x1, y1, x2, y2, board, boardLogic))
            {
                TurnChange(board);
                Move move = new Move();
                move.x1 = x1;
                move.y1 = y1;
                move.x2 = x2;
                move.y2 = y2;
                pastMoves.Push(move);
                if (print)
                {
                    GameDisplay.PrintBoard(board, this, x1, y1, x2, y2);
                }
                return(true);
            }
            return(false);
        }