petStorm
This KoTH exists for a single reason: to disqualify [this](https://codegolf.meta.stackexchange.com/a/18716/92069) loophole. Since this is in Sandbox any suggestions will be appreciated.
Unlike most king of the hill challenges, the controller is also an example bot fighting with other bots.
## Specification
* Every bot will be given the system clock (and a global leaderboard) as an operand.
* If given the operand `-1`, the bot should return its name, for the ease of telling who is the winner.
* At any other operand, the bot do something to the leaderboard (including ignoring it), as well as making sure that the leaderboard has exactly the same values as the previous leaderboard.
* The leaderboard is a list containing all the functions that contain the methods of the bots.
* The top bot in the leaderboard after 1000 iterations wins. The game will be ran multiple times and the overall score will be calculated.
* You are **encouraged** to exploit a bug in the controller.
### Controller function (in [Io](http://iolanguage.org/))
This controller uses the ability of all other bots to compete.
Then we just iterate the controller 1000 times and print the final leaderboard; that part of the controller isn't part of the fight.
Ahh! To enter loop just recursively execute the controller itself. It should stop on 1000 iterations! But we need a way for the controller to tell which bot it's exeuting.
We want the controller to know which bot it's currently executing for the final output of the winning bot.
## Controller with name returning.
```
method(x,
if(x == -1, // Tell the name!
return "~~~"
)
if(x == 1000, // Ending condition
winner := controller at(0)
winner(-1) println // What's the name of the winner?
exit(0)
)
// Main process
bots foreach(i,
i(x+1) // Provide the bot with the controller + 1
bots println
)
)
```
And then, we start by executing the controller, which is definitely the last item.