示例#1
0
 /// <summary>
 /// Konumlanma koordinatlarının platoya göre kontrolü
 /// </summary>
 /// <param name="plateau"></param>
 /// <param name="deploymentPoint"></param>
 private void CheckDeploymentPoint(PlateauModel plateau, DeploymentPointModel deploymentPoint)
 {
     if (plateau.Width < deploymentPoint.X || plateau.Height < deploymentPoint.Y || deploymentPoint.X < 0 || deploymentPoint.Y < 0)
     {
         throw new OutOfBoundsFromPlateauException("Rover can't located on plateau.");
     }
 }
示例#2
0
 /// <summary>
 /// Gezicinin plato üzerine konumlanmasını sağlar.
 /// </summary>
 /// <param name="plateau"></param>
 /// <param name="deploymentPoint"></param>
 /// <returns></returns>
 public RoverModel SetRoverOnPlateau(PlateauModel plateau, DeploymentPointModel deploymentPoint)
 {
     CheckDeploymentPoint(plateau, deploymentPoint);
     CheckDirection(deploymentPoint.Direction);
     return(new RoverModel()
     {
         DeploymentPoint = deploymentPoint
     });
 }