tl;dr [True] Billy got a Stack Overflow pen from Tim Post. Billy was stupid enough to use the pen, knowing that he was not worthy. Billy's friend took the pen apart, so Billy put the pen in a drawer at his house, hoping he would eventually fix it. A year later, Billy can only find half of the pen's pieces, and not the main part that has the words "Stack Overflow" on it. [EndTrue] [Fake] Billy looked at his home security camera and saw that a burglar had come in his house while he was sleeping and taken his pen. Billy vows revenge! Why can't he just ask for another Stack Overflow pen? Because this is the last one in existence. [EndFake] Err, technically this whole thing is fake because my name isn't Billy.
Help Billy find the scumbag that stole his pen so he can ultimately deal mortal damage to him and get the other half of his pen back! You will use a World object that has the following methods:
objectsAtPosition(lon: Number, lat: Number)
This returns an array of strings. One string for every object at the specified longitude (lon) and latitude (lat). The possible strings are:
SUP
- Super User Pen
SFP
- Server Fault Pen
SOP
- Stack Overflow Pen
BD
- Bad Dog
GD
- Good Dog
G
- Giygas
destroyObjectAt(lon: Number, lat: Number, i)
This destroys the object at the specified longitude, latitude, and index. For example, if at a specified longitude (lon) and latitude (lat) there are two or more objects, destroy the nth object in the array depending on what the index (i) is. You will destroy every Giygas and every Bad Dog.
giveTreatToObjectAt(lon: Number, lat: Number, i)
This gives a treat to the object at the specified longitude (lon), latitude (lat), and index. For example, if at a specified longitude (lon) and latitude (lat) there are two or more objects, give a treat to the nth object in the array depending on what the index (i) is. You will give all good dogs a treat.
collectObjectAt(lon: Number, lat: Number, i)
This collects the object at the specified longitude (lon) and latitude (lat), and index. For example, if at a specified longitude (lon) and latitude (lat) there are two or more objects, collect the nth object in the array depending on what the index (i) is. You will collect Billy's Stack Overflow pen and nothing else or else you die. Keep in mind that there is only Billy's Stack Overflow pen left in existence.
You will index through every longitude and latitude value (look below) and treat every object found as they should be treated.
Longitude and latitude rage from 0-10. Iterate incrementing by 1. Treat lon and lat as integers if you'd like. Use whatever-based indexing the language you're coding this in uses. This is code-golf, so shortest bytes in code wins.
Every item is an array. Here's an example of what the Array would be like. It's a 2D Array, 10x10. Longitude brings you right and latitude brings you down. So longitude with 5 and latitude with 4 would select this:
['SO','SU'],['Example'],['Example'],['Example'],['Example'],['Example'],['Example'],['Example'],['Example'],['Example']
['SO','SU'],['Example'],['Example'],['Example'],['Example'],['Example'],['Example'],['Example'],['Example'],['Example']
['SO','SU'],['Example'],['Example'],['Example'],['Example'],['Example'],['Example'],['Example'],['Example'],['Example']
['SO','SU'],['Example'],['Example'],['Example'],['Example'],['Example'],['Example'],['Example'],['Example'],['Example']
['SO','SU'],['Example'],['Example'],['Example'],['Example'],['*Example*'],['Example'],['Example'],['Example'],['Example']
['SO','SU'],['Example'],['Example'],['Example'],['Example'],['Example'],['Example'],['Example'],['Example'],['Example']
['SO','SU'],['Example'],['Example'],['Example'],['Example'],['Example'],['Example'],['Example'],['Example'],['Example']
['SO','SU'],['Example'],['Example'],['Example'],['Example'],['Example'],['Example'],['Example'],['Example'],['Example']
['SO','SU'],['Example'],['Example'],['Example'],['Example'],['Example'],['Example'],['Example'],['Example'],['Example']
['SO','SU'],['Example'],['Example'],['Example'],['Example'],['Example'],['Example'],['Example'],['Example'],['Example']
or
0→[item]1→[item]2→[item]3→[item]4→[item]5→[item]0↓[item][item][item][item]
[item] [item] [item] [item] [item] [item]1↓[item][item][item][item]
[item] [item] [item] [item] [item] [item]2↓[item][item][item][item]
[item] [item] [item] [item] [item] [item]3↓[item][item][item][item]
[item] [item] [item] [item] [item][*item*]←4[item][item][item][item]
[item] [item] [item] [item] [item] [item] [item][item][item][item]
[item] [item] [item] [item] [item] [item] [item][item][item][item]
[item] [item] [item] [item] [item] [item] [item][item][item][item]
[item] [item] [item] [item] [item] [item] [item][item][item][item]
[item] [item] [item] [item] [item] [item] [item][item][item][item]
In case you don't see it, it will select the item "Example" in the first one and the item "item" in the second one. I'm not sure how the human brain works, use your browser's search on page feature if you still don't see it.
PS:
If you don't know what a Giygas is, just know that you have to destroy it... or pray for your life by it (which ultimately destroys it anyway).