示例#1
0
 public void Draw(Map map, IDrawer drawer)
 {
     var waveRun = new WaveRun(map, map.Robot);
     var first = true;
     drawer.AddStyle("target", "Gold");
     drawer.AddStyle("firstTarget", "Fuchsia");
     Tuple<Vector, Stack<RobotMove>> firstTarget = null;
     foreach (var target in waveRun.EnumerateTargets((lmap, pos, stepNumber) => lmap.GetCell(pos) == MapCell.Lambda))
     {
         if (first) firstTarget = target;
         var style = first ? "firstTarget" : "target";
         first = false;
         drawer.DrawTarget(map, style, target);
     }
     if (waveRun.Lift != null)
     {
         drawer.DrawTarget(map, "target", waveRun.Lift);
     }
     if (firstTarget != null)
         drawer.DrawTarget(map, "firstTarget", firstTarget);
 }
示例#2
0
 public void Draw(Map map, IDrawer drawer)
 {
     if(moveRockTarget == null) return;
     drawer.AddStyle("rock", "Brown");
     drawer.DrawTarget(map, lastRobotPos, "rock", moveRockTarget);
 }