Exemple #1
0
 static IEnumerable<DronePosition> VariateByZones(DronePosition pos, Point[] zones)
 {
   for(var i = 0; i < zones.Length; ++i)
   {
     var zone = zones[i];
     if (Dist(pos.Point, zone) <= pos.Radius + 100)
       yield return new DronePosition(zone, 100, zone: i);
   }
   yield return new DronePosition(pos.Point, pos.Radius, -1);
 }
Exemple #2
0
 static IEnumerable <DronePosition> VariateByZones(DronePosition pos, Point[] zones)
 {
     for (var i = 0; i < zones.Length; ++i)
     {
         var zone = zones[i];
         if (Dist(pos.Point, zone) <= pos.Radius + 100)
         {
             yield return(new DronePosition(zone, 100, zone: i));
         }
     }
     yield return(new DronePosition(pos.Point, pos.Radius, -1));
 }
Exemple #3
0
 static DronePosition Move(DronePosition pos, int turns = 1)
 {
     return(new DronePosition(pos.Point, pos.Radius + turns * 100, zone: null));
 }
Exemple #4
0
 static DronePosition Move(DronePosition pos, int turns = 1)
 {
   return new DronePosition(pos.Point, pos.Radius + turns * 100, zone:null);
 }