예제 #1
0
 public async Task <ActionResult> CreateBoardAndPositionShips(List <Ship> ships)
 {
     try
     {
         foreach (var ship in ships)
         {
             await _positionService.AllocateCoordinates(ship);
         }
         return(new OkResult());
     }
     catch (Exception ex)
     {
         _logger.Error($"Exception {ex} while positioning {ships}");
         return(new StatusCodeResult((int)HttpStatusCode.InternalServerError));
     }
 }