예제 #1
0
        public async Task <ActionResult <bool> > Land([FromBody] LandRequestDto landDto)
        {
            if (await _planetService.IsValidTile(landDto.Latitude, landDto.Longitude))
            {
                await _roverService.Land(landDto.Latitude, landDto.Longitude);

                return(Ok($"Rover has landed at {_roverService.Position.Item1},{_roverService.Position.Item2} facing {_roverService.Compass.ToString()}"));
            }
            return(Ok("The rover cannot land there"));
        }