The wind blew really hard last night. There is litter everywhere outside Reeborg's house. His parents asked him to go and clean up the driveway, as well as the path leading to the curb. They both are in a straight line, with garbage at random places as illustrated below.
Reeborg should collect all the litter, and put it in the garbage can, situated north of his starting point. The final situation should look like the following:
Make sure your program work in both situations (world files: trash1.wld and trash2.wld).
Reeborg's parents are so proud of his work, that they ask him to pick up all the garbage that got blown away in their backyard during the windstorm. Have Reeborg pick up all the garbage and bring it back with him to his starting position. Try to generalise from the program you just wrote to clean up the driveway.
Create your own world file, corresponding to a situation like the one illustrated below. Your solution should not depend on the exact locatio of the garbage, nor should it depend on the size of the yard.