public List<LowLevelCommand> Translate(Report current, StoppingAt action)
 {
     var report = current as StrategyTesterReport;
     if (report == null)
         throw new ArgumentException();
     var targetAngle = AngleCaculator.CalculateAngle(report.Coords, action.Coords);
     var result = Translate(current, new MovementTo(action.Coords));
     result.Add(MakeRotate(targetAngle, action.AngleInRadians));
     return result;
 }
Beispiel #2
0
 public Strategy StopAt(int x, int y, double angle)
 {
     var newItem = new StoppingAt(new PointD(x, y), (angle/180)*Math.PI);
     Connect(newItem);
     return this;
 }