Ejemplo n.º 1
0
        /// <summary>
        /// Calculates the point in the set which has the biggest distance to the given line
        /// </summary>
        /// <returns>The _index_ of the furhtest point</returns>
        internal static Coordinate?LongestDistance(this HashSet <Coordinate> coors, Coordinate a, Coordinate b)
        {
            var        ax      = a.Longitude;
            var        ay      = a.Latitude;
            var        bx      = b.Longitude;
            var        by      = b.Latitude;
            var        maxDist = float.MinValue;
            Coordinate?max     = null;


            foreach (var p in coors)
            {
                var x = p.Longitude;
                var y = p.Latitude;

                // If we needed the actual euclidian distance, we'd also have to calculate by some squarerootstuff
                // However, this is constant if point A/B stay constant, so we just drop it
                var d = Math.Abs((by - ay) * x - (bx - ax) * y + bx * ay - by * ax);
                if (maxDist < d)
                {
                    maxDist = d;
                    max     = p;
                }
            }

            return(max);
        }
Ejemplo n.º 2
0
        protected override CommandResult OnExecute(CommandContext context)
        {
            context.ThrowIfNull("worldInstance");

            Coordinate coordinate = context.Player.Coordinate;

            switch (_direction)
            {
                case MoveDirection.Up:
                    _destinationCoordinate = new Coordinate(coordinate.X, coordinate.Y - 1);
                    break;
                case MoveDirection.Down:
                    _destinationCoordinate = new Coordinate(coordinate.X, coordinate.Y + 1);
                    break;
                case MoveDirection.Left:
                    _destinationCoordinate = new Coordinate(coordinate.X - 1, coordinate.Y);
                    break;
                case MoveDirection.Right:
                    _destinationCoordinate = new Coordinate(coordinate.X + 1, coordinate.Y);
                    break;
                default:
                    throw new Exception(String.Format("Unexpected direction '{0}'", _direction));
            }

            return ProcessDestinationCoordinate(context, context.CurrentBoard, _destinationCoordinate.Value);
        }
Ejemplo n.º 3
0
        private void _UpdateUniqueCoordinates(
            BitVector possiblesToCheck,
            ReadOnlySpan <Coordinate> coordinatesToCheck,
            Dictionary <Coordinate, BitVector> previousPossibles)
        {
            Span <int> possibleValues = stackalloc int[_numPossibleValues];
            int        numPossible    = possiblesToCheck.PopulateSetBits(possibleValues);

            for (int i = 0; i < numPossible; ++i)
            {
                int        possibleToCheck = possibleValues[i];
                Coordinate?uniqueCoord     = null;
                foreach (Coordinate c in coordinatesToCheck)
                {
                    if (_puzzle.GetPossibleValues(in c).IsBitSet(possibleToCheck))
                    {
                        if (uniqueCoord.HasValue)
                        {
                            uniqueCoord = null;
                            break;
                        }
                        uniqueCoord = c;
                    }
                }
                if (!uniqueCoord.HasValue)
                {
                    continue;
                }
                var possibles = new BitVector();
                possibles.SetBit(possibleToCheck);
                previousPossibles[uniqueCoord.Value] = _puzzle.GetPossibleValues(uniqueCoord.Value);
                _puzzle.SetPossibleValues(uniqueCoord.Value, possibles);
            }
        }
Ejemplo n.º 4
0
        private void OnTurnStarted()
        {
            Invoke((MethodInvoker)delegate
           {
               Text = $"{chessboard.CurrentPlayerTurn}'s turn";
           });

            if (MatchMaker.PlaySoundOnMove)
            {
                soundPlayer.Play();
            }

            UpdateBoard();

            if (chessboard.Moves.Count == 0)
            {
                return;
            }

            PieceMove recentMove = chessboard.Moves.Peek().Moves[0];
            recentMoveFrom = recentMove.Source;
            recentMoveTo = recentMove.Destination;

            ResetAllTableStyling();
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Gets the length of an edge.
        /// </summary>
        public static float Length(this GeometricGraph graph, GeometricEdge edge)
        {
            var totalLength = 0.0f;

            var        previous = graph.GetVertex(edge.From);
            Coordinate?current  = null;
            var        shape    = edge.Shape;

            if (shape != null)
            {
                var shapeEnumerator = shape.GetEnumerator();
                shapeEnumerator.Reset();
                while (shapeEnumerator.MoveNext())
                {
                    current      = shapeEnumerator.Current;
                    totalLength += Coordinate.DistanceEstimateInMeter(
                        previous.Latitude, previous.Longitude,
                        current.Value.Latitude, current.Value.Longitude);
                    previous = current.Value;
                }
            }
            current      = graph.GetVertex(edge.To);
            totalLength += Coordinate.DistanceEstimateInMeter(
                previous.Latitude, previous.Longitude,
                current.Value.Latitude, current.Value.Longitude);
            return(totalLength);
        }
        public WatchVariableNumberWrapper(
            WatchVariable watchVar,
            WatchVariableControl watchVarControl,
            Type displayType      = DEFAULT_DISPLAY_TYPE,
            int?roundingLimit     = DEFAULT_ROUNDING_LIMIT,
            bool?displayAsHex     = DEFAULT_DISPLAY_AS_HEX,
            bool useCheckbox      = DEFAULT_USE_CHECKBOX,
            Coordinate?coordinate = null)
            : base(watchVar, watchVarControl, useCheckbox)
        {
            _displayType = displayType;

            _defaultRoundingLimit = roundingLimit ?? DEFAULT_ROUNDING_LIMIT;
            _roundingLimit        = _defaultRoundingLimit;
            if (_roundingLimit < -1 || _roundingLimit > MAX_ROUNDING_LIMIT)
            {
                throw new ArgumentOutOfRangeException();
            }

            _defaultDisplayAsHex = displayAsHex ?? DEFAULT_DISPLAY_AS_HEX;
            _displayAsHex        = _defaultDisplayAsHex;

            AddCoordinateContextMenuStripItems();
            AddNumberContextMenuStripItems();

            if (coordinate != null)
            {
                WatchVariableCoordinateManager.NotifyCoordinate(coordinate.Value, this);
            }
        }
Ejemplo n.º 7
0
        public WatchVariableControlPrecursor(
            string name,
            WatchVariable watchVar,
            WatchVariableSubclass subclass,
            Color?backgroundColor,
            Type displayType,
            int?roundingLimit,
            bool?useHex,
            bool?invertBool,
            bool?isYaw,
            Coordinate?coordinate,
            List <VariableGroup> groupList,
            List <uint> fixedAddresses = null)
        {
            Name            = name;
            WatchVar        = watchVar;
            Subclass        = subclass;
            BackgroundColor = backgroundColor;
            DisplayType     = displayType;
            RoundingLimit   = roundingLimit;
            UseHex          = useHex;
            InvertBool      = invertBool;
            IsYaw           = isYaw;
            Coordinate      = coordinate;
            GroupList       = groupList;
            FixedAddresses  = fixedAddresses;

            VerifyState();
        }
Ejemplo n.º 8
0
    public List <Coordinate> CoordinatesInManhattanRange(Coordinate centerTile, int range, bool allowsWrapping = false)
    {
        List <Coordinate> coords = new List <Coordinate>();

        for (int x = centerTile.x - range; x <= centerTile.x + range; ++x)
        {
            Coordinate?mid = this.ConstructValidCoordinate(x, centerTile.y, allowsWrapping);
            if (mid.HasValue)
            {
                coords.Add(mid.Value);
            }
            int rangeAtRow = range - (Mathf.Abs(centerTile.x - x));
            for (int i = 1; i <= rangeAtRow; ++i)
            {
                Coordinate?up = this.ConstructValidCoordinate(x, centerTile.y + i, allowsWrapping);
                if (up.HasValue)
                {
                    coords.Add(up.Value);
                }

                Coordinate?down = this.ConstructValidCoordinate(x, centerTile.y - i, allowsWrapping);
                if (down.HasValue)
                {
                    coords.Add(down.Value);
                }
            }
        }
        return(coords);
    }
Ejemplo n.º 9
0
        public WatchVariableControlPrecursor(XElement element)
        {
            /// Watchvariable params
            string typeName    = (element.Attribute(XName.Get("type"))?.Value);
            string specialType = element.Attribute(XName.Get("specialType"))?.Value;
            BaseAddressTypeEnum baseAddressType = WatchVariableUtilities.GetBaseAddressType(element.Attribute(XName.Get("base")).Value);
            uint?offsetUS      = ParsingUtilities.ParseHexNullable(element.Attribute(XName.Get("offsetUS"))?.Value);
            uint?offsetJP      = ParsingUtilities.ParseHexNullable(element.Attribute(XName.Get("offsetJP"))?.Value);
            uint?offsetSH      = ParsingUtilities.ParseHexNullable(element.Attribute(XName.Get("offsetSH"))?.Value);
            uint?offsetEU      = ParsingUtilities.ParseHexNullable(element.Attribute(XName.Get("offsetEU"))?.Value);
            uint?offsetDefault = ParsingUtilities.ParseHexNullable(element.Attribute(XName.Get("offset"))?.Value);
            uint?mask          = element.Attribute(XName.Get("mask")) != null ?
                                 (uint?)ParsingUtilities.ParseHex(element.Attribute(XName.Get("mask")).Value) : null;
            int?shift = element.Attribute(XName.Get("shift")) != null?
                        int.Parse(element.Attribute(XName.Get("shift")).Value) : (int?)null;

            bool handleMapping = (element.Attribute(XName.Get("handleMapping")) != null) ?
                                 bool.Parse(element.Attribute(XName.Get("handleMapping")).Value) : true;
            string name = element.Value;

            WatchVar =
                new WatchVariable(
                    name,
                    typeName,
                    specialType,
                    baseAddressType,
                    offsetUS,
                    offsetJP,
                    offsetSH,
                    offsetEU,
                    offsetDefault,
                    mask,
                    shift,
                    handleMapping);

            Name            = name;
            Subclass        = WatchVariableUtilities.GetSubclass(element.Attribute(XName.Get("subclass"))?.Value);
            GroupList       = WatchVariableUtilities.ParseVariableGroupList(element.Attribute(XName.Get("groupList"))?.Value);
            BackgroundColor = (element.Attribute(XName.Get("color")) != null) ?
                              ColorUtilities.GetColorFromString(element.Attribute(XName.Get("color")).Value) : (Color?)null;
            string displayTypeName = (element.Attribute(XName.Get("display"))?.Value);

            DisplayType   = displayTypeName != null ? TypeUtilities.StringToType[displayTypeName] : null;
            RoundingLimit = (element.Attribute(XName.Get("round")) != null) ?
                            ParsingUtilities.ParseInt(element.Attribute(XName.Get("round")).Value) : (int?)null;
            UseHex = (element.Attribute(XName.Get("useHex")) != null) ?
                     bool.Parse(element.Attribute(XName.Get("useHex")).Value) : (bool?)null;
            InvertBool = element.Attribute(XName.Get("invertBool")) != null?
                         bool.Parse(element.Attribute(XName.Get("invertBool")).Value) : (bool?)null;

            IsYaw = (element.Attribute(XName.Get("yaw")) != null) ?
                    bool.Parse(element.Attribute(XName.Get("yaw")).Value) : (bool?)null;
            Coordinate = element.Attribute(XName.Get("coord")) != null?
                         WatchVariableUtilities.GetCoordinate(element.Attribute(XName.Get("coord")).Value) : (Coordinate?)null;

            FixedAddresses = element.Attribute(XName.Get("fixed")) != null?
                             ParsingUtilities.ParseHexList(element.Attribute(XName.Get("fixed")).Value) : null;

            VerifyState();
        }
Ejemplo n.º 10
0
        /// <summary>
        /// Creates a new scroll bar.
        /// </summary>
        /// <param name="controlledAreaLength">The length of the scrollable area.</param>
        /// <param name="windowLength">The length of the visible part of the scrollable area, and the length of the scroll bar itself.</param>
        /// <param name="initialPosition">The initial position in the scrollable area.</param>
        /// <param name="position">The position on the screen of the scroll bar itself.</param>
        public ScrollBar(int controlledAreaLength, int windowLength, Coordinate?position = null, int initialPosition = 0, bool enabled = true, Color?color = null, Color?disabledColor = null)
        {
            controlledAreaPos = initialPosition;
            if (position != null)
            {
                this.position = (Coordinate)position;
            }
            else
            {
                this.position = Coordinate.Zero;
            }
            Resize(controlledAreaLength, windowLength);

            if (color != null)
            {
                this.color = (Color)color;
            }
            else
            {
                this.color = Color.White;
            }

            if (disabledColor != null)
            {
                this.disabledColor = (Color)disabledColor;
            }
            else
            {
                this.disabledColor = new Color(this.color.R / 2, this.color.G / 2, this.color.B / 2, this.color.A);
            }

            Enabled = enabled;
        }
Ejemplo n.º 11
0
 private void CheckCleanFinished(Coordinate?coordinate)
 {
     if (currenActions.Count.Equals(total_actions))
     {
         this.CleanedPlaces.Add(coordinate);
     }
 }
Ejemplo n.º 12
0
        /// <summary>
        /// Calculates the (index of) the northernmost and southernmost point (using latitude).
        /// </summary>
        internal static void CalculateMinMaxX(this IEnumerable <Coordinate> coors, out Coordinate?minPoint,
                                              out Coordinate?maxPoint)
        {
            var minVal = float.MaxValue;
            var maxVal = float.MinValue;

            minPoint = null;
            maxPoint = null;

            foreach (var coor in coors)
            {
                if (minVal > coor.Latitude)
                {
                    minPoint = coor;
                    minVal   = coor.Latitude;
                }

                // ReSharper disable once InvertIf
                if (maxVal < coor.Latitude)
                {
                    maxPoint = coor;
                    maxVal   = coor.Latitude;
                }
            }
        }
Ejemplo n.º 13
0
 private void processIntoStack(List <Coordinate> stack, Coordinate?coord, bool[,] processedFlags)
 {
     if (coord.HasValue && !processedFlags[coord.Value.x, coord.Value.y])
     {
         stack.Insert(0, coord.Value);
         processedFlags[coord.Value.x, coord.Value.y] = true;
     }
 }
Ejemplo n.º 14
0
 private void _UpdateBox(int box, IDictionary <Coordinate, BitVector> previousPossibles)
 {
     foreach (int possible in _possiblesToCheckInBox[box].GetSetBits())
     {
         Coordinate?uniqueCoord = null;
         foreach (Coordinate c in _puzzle.YieldUnsetCoordsForBox(box))
         {
             if (_possibleValues[in c].IsBitSet(possible))
Ejemplo n.º 15
0
 public PieceMove(Coordinate?destination, Coordinate?source, Piece piece, bool captures, Piece promotePiece = null)
 {
     this.Destination  = destination;
     this.Source       = source;
     this.Piece        = piece;
     this.Captures     = captures;
     this.PromotePiece = promotePiece;
 }
Ejemplo n.º 16
0
 public static void Swap(Coordinate p1, Coordinate p2)
 {
     Map[p1.X, p1.Y].Move(new Coordinate(p2.X, p2.Y));
     Map[p2.X, p2.Y].Move(new Coordinate(p1.X, p1.Y));
     Map.SwapArrayElements(p1, p2);
     ClickedObject  = null;
     MoveIsFinished = !MoveIsFinished;
 }
Ejemplo n.º 17
0
        public void CoordinateEquals_GivenNull_NotEqual()
        {
            Coordinate coordinate1 = new Coordinate(new Longitude(48, 52),
                                                    new Latitude(-2, -20));
            Coordinate?coordinate2 = null;

            Assert.IsFalse(coordinate1.Equals(coordinate2));
        }
Ejemplo n.º 18
0
        private void GetNextPlace(Coordinate?coordinate, KeyValuePair <string, int> direction)
        {
            var newCoordinate = new Coordinate(0, 0);

            for (int i = 0; i < direction.Value; i++)
            {
                Route.Add(newCoordinate);
            }
        }
Ejemplo n.º 19
0
        public bool Equals(Coordinate?c)
        {
            if (c is null)
            {
                return(false);
            }

            return(Row == c.Row && Col == c.Col);
        }
        private void UpdateCoordinateText(Coordinate?coordinate)
        {
            if (coordinate == null)
            {
                coordinateText.text = string.Empty;
                return;
            }

            coordinateText.text = coordinate.ToString();
        }
Ejemplo n.º 21
0
 private void WorldView_MouseUp(object sender, MouseEventArgs e)
 {
     if (e.Button.HasFlag(MouseButtons.Right) && _startMove.HasValue)
     {
         MouseMoveView(e.Location);
         _startMove    = null;
         _startTopLeft = null;
         Cursor        = Cursors.Cross;
     }
 }
Ejemplo n.º 22
0
        /// <summary>
        /// Determines whether specific <c>object</c> instance is equal to the current <c>Coordinate</c>.
        /// </summary>
        /// <param name="obj">The <c>object</c> to compare with the current <c>Coordinate</c></param>
        /// <returns>true if the specified  <c>object</c> is equal to the current <c>Coordinate</c>; otherwise, false.</returns>
        public override bool Equals(object obj)
        {
            Coordinate?other = obj as Coordinate?;

            if (other == null)
            {
                return(false);
            }

            return(this.Equals(other.Value));
        }
Ejemplo n.º 23
0
        public static string FormatState(int?doorId = null, Coordinate?coordinates = null, string uniqueId = null)
        {
            var state = string.Empty;

            if (doorId.HasValue)
            {
                state += nameof(DoorId).FormatParameter(doorId.Value);
            }

            return(state + Dispatchee <Door> .FormatState(coordinates, uniqueId));
        }
 public static GroundNetworkCoordinate Make(Coordinate?coordinate = null)
 {
     return(new Faker <GroundNetworkCoordinate>()
            .CustomInstantiator(
                _ => new GroundNetworkCoordinate(
                    coordinate ?? CoordinateFactory.Make(),
                    DefinitionFactory.Make(),
                    DocblockFactory.Make(),
                    CommentFactory.Make()
                    )
                ));
 }
Ejemplo n.º 25
0
        public WatchVariableControlPrecursor(
            string typeName    = null,
            string specialType = null,
            BaseAddressTypeEnum baseAddressType = BaseAddressTypeEnum.Relative,
            uint?offsetUS                  = null,
            uint?offsetJP                  = null,
            uint?offsetSH                  = null,
            uint?offsetEU                  = null,
            uint?offsetDefault             = null,
            uint?mask                      = null,
            int?shift                      = null,
            bool handleMapping             = true,
            string name                    = null,
            WatchVariableSubclass subclass = WatchVariableSubclass.Number,
            Color?backgroundColor          = null,
            Type displayType               = null,
            int?roundingLimit              = null,
            bool?useHex                    = null,
            bool?invertBool                = null,
            bool?isYaw                     = null,
            Coordinate?coordinate          = null,
            List <VariableGroup> groupList = null,
            List <uint> fixedAddresses     = null)
        {
            WatchVar =
                new WatchVariable(
                    name,
                    typeName,
                    specialType,
                    baseAddressType,
                    offsetUS,
                    offsetJP,
                    offsetSH,
                    offsetEU,
                    offsetDefault,
                    mask,
                    shift,
                    handleMapping);
            Name            = name;
            Subclass        = subclass;
            BackgroundColor = backgroundColor;
            DisplayType     = displayType;
            RoundingLimit   = roundingLimit;
            UseHex          = useHex;
            InvertBool      = invertBool;
            IsYaw           = isYaw;
            Coordinate      = coordinate;
            GroupList       = groupList;
            FixedAddresses  = fixedAddresses;

            VerifyState();
        }
Ejemplo n.º 26
0
 public static Fix Make(string identifier = null, Coordinate?coordinate = null)
 {
     return(new Faker <Fix>()
            .CustomInstantiator(
                f => new Fix(
                    identifier ?? f.Random.ArrayElement(Identifiers),
                    coordinate ?? CoordinateFactory.Make(),
                    DefinitionFactory.Make(),
                    DocblockFactory.Make(),
                    CommentFactory.Make()
                    )
                ));
 }
        public GetServiceResponse ExecuteGet(GetServiceByIdRequest requestParams)
        {
            var servicesGatewayResponse = _servicesGateway.GetService(requestParams.Id);

            var usecaseResponse = servicesGatewayResponse.ToResponse();

            if (usecaseResponse == null)
            {
                return(null);
            }
            usecaseResponse.Metadata.PostCode = requestParams.PostCode;

            if (!string.IsNullOrEmpty(requestParams.PostCode))
            {
                try
                {
                    Coordinate?postcodeCoord = _addressesGateway.GetPostcodeCoordinates(requestParams.PostCode);

                    if (postcodeCoord.HasValue)
                    {
                        usecaseResponse.Metadata.PostCodeLatitude  = postcodeCoord.Value.Latitude;
                        usecaseResponse.Metadata.PostCodeLongitude = postcodeCoord.Value.Longitude;

                        foreach (var location in usecaseResponse.Service.Locations)
                        {
                            if (location.Latitude.HasValue && location.Longitude.HasValue)
                            {
                                location.Distance =
                                    GeoCalculator.GetDistance(
                                        postcodeCoord.Value,
                                        new Coordinate(location.Latitude.Value, location.Longitude.Value),
                                        decimalPlaces: 1,
                                        DistanceUnit.Miles
                                        ) + " miles";
                            }
                        }
                    }
                    else
                    {
                        usecaseResponse.Metadata.Error = "Postcode coordinates not found.";
                    }
                }
                catch (Exception ex)
                {
                    usecaseResponse.Metadata.Error = ex.Message;
                }
            }

            return(usecaseResponse);
        }
        public GetServiceResponseList ExecuteGet(SearchServicesRequest requestParams)
        {
            requestParams.Search = UrlHelper.DecodeParams(requestParams.Search);
            var postcodeIsGiven = !string.IsNullOrEmpty(requestParams.PostCode);

            var gatewayResponse = _servicesGateway.SearchServices(requestParams);
            var fullMServices   = gatewayResponse.FullMatchServices.ToResponseServices();
            var splitMServices  = gatewayResponse.SplitMatchServices.ToResponseServices();


            var metadata = new Metadata();

            metadata.PostCode = postcodeIsGiven ? requestParams.PostCode : null;

            if (postcodeIsGiven)
            {
                try
                {
                    //Get the postcode's coordinates
                    Coordinate?postcodeCoord = _addressesGateway.GetPostcodeCoordinates(requestParams.PostCode);

                    if (postcodeCoord.HasValue)
                    {
                        metadata.PostCodeLatitude  = postcodeCoord.Value.Latitude;
                        metadata.PostCodeLongitude = postcodeCoord.Value.Longitude;

                        fullMServices.CalculateServiceLocationDistances(postcodeCoord.Value);
                        splitMServices.CalculateServiceLocationDistances(postcodeCoord.Value);
                    }
                    else
                    {
                        metadata.Error = "Postcode coordinates not found.";
                    }
                }
                catch (Exception ex)
                {
                    metadata.Error = ex.Message;
                }
            }

            if (postcodeIsGiven)       // And metadata error is empty
            {
                fullMServices.Sort();  // Sort by minimum service location's distance
                splitMServices.Sort(); // IComparator<Service> is defined on the object iteself
            }

            var usecaseResponse = ServiceFactory.SearchServiceUsecaseResponse(fullMServices, splitMServices, metadata);

            return(usecaseResponse);
        }
Ejemplo n.º 29
0
        public static IDiagram Ellipse(decimal xRadius, decimal yRadius, Coordinate?center = null)
        {
            if (center == null)
            {
                center = Coordinate.Origin();
            }

            if (xRadius == yRadius)
            {
                return(Circle(xRadius, center));
            }

            return(new EllipseDiagram(xRadius, yRadius, center));
        }
Ejemplo n.º 30
0
 public PlayerData(
     int id,
     string name,
     int score,
     Coordinate?pos,
     Coordinate?dir
     )
 {
     this.id    = id;
     this.name  = name;
     this.score = score;
     this.pos   = pos;
     this.dir   = dir;
 }
Ejemplo n.º 31
0
    public static void SetXY(this Coordinate?target, Coordinate?source)
    {
        if (target is null)
        {
            return;
        }
        if (source is null)
        {
            return;
        }

        target.X = source.X;
        target.Y = source.Y;
    }
Ejemplo n.º 32
0
        public void SetSelection(Coordinate originCoordinate)
        {
            var offset = (int)Math.Ceiling((SelectionSize / 2f) - 1);

            TopLeftSelectionCoordinate = new Coordinate(originCoordinate.X - offset, originCoordinate.Y - offset);
        }
Ejemplo n.º 33
0
 public void ClearSelection()
 {
     TopLeftSelectionCoordinate = null;
 }
        protected override sealed CommandResult OnExecute(CommandContext context)
        {
            context.ThrowIfNull("context");

            _destinationCoordinate = GetDestinationCoordinate(context);

            return _destinationCoordinate != null ? MoveActorInstance(context, _destinationCoordinate.Value) : CommandResult.Failed;
        }