swarm-0.5.0.0: data/scenarios/Testing/836-pathfinding/_836-automatic-waypoint-navigation/rabbit.sw
def visitNextWaypoint = \nextWpIdx.
emptyHere <- isempty;
if emptyHere {
try {
place "egg";
} {};
} {};
watch down;
nextWaypointQuery <- waypoint "wp" nextWpIdx;
teleport self $ snd nextWaypointQuery;
wait 1000;
visitNextWaypoint $ nextWpIdx + 1;
end;
visitNextWaypoint 0;