Ejemplo n.º 1
0
        /// <summary>
        /// Return the coordinates for the next move.
        /// </summary>
        /// <returns>Coordinates</returns>
        public Coordinates GetCoordinatesForNextMove(int numberOfGridSquaresToMove = 1)
        {
            var getMoveForCurrentDirection = Facing.GetMovesOffset();

            // Add current coords to the (move offset coords * numberOfGridSquaresToMove)
            var newCoords = new Coordinates(Coords.X + (getMoveForCurrentDirection.X * numberOfGridSquaresToMove), Coords.Y + (getMoveForCurrentDirection.Y * numberOfGridSquaresToMove));

            return(newCoords);
        }