Пример #1
0
        private bool Move(Point origin, Point destination)
        {
            Piece mover = board[origin.X, origin.Y].piece;
            Move  move  = mover.CanMove(this, origin, destination);

            if (move != null)
            {
                move.Execute();
                board[destination.X, destination.Y].piece = mover;
                board[origin.X, origin.Y].piece           = null;
                Update(origin);
                Update(destination);
                currentPlayer = currentPlayer == Team.White ? Team.Black : Team.White;
                return(true);
            }
            return(false);
        }