The main aim of the game is to be the last bot standing. A bot is classed as still in the game if they have energy.
Energy is lost every time a bot fires a bullet OR is hit by a bullet.
Energy is gain on a successful hit
A bot will also start to loss energy quickly if they fail to fire after a set period of time
So far in your code you have a line that read fire(1). The number in the brackets indicates the bullets power
As bullet power goes up, bullets move more slowly, require more energy, do more damage to the enemy but will give back more energy to the firing bot on a successful hit. Power is between 1-3 and include decimals numbers.
Before just picking a number to fire with, we can instead use key information to help inform our decision. Such as how far the enemy if away or how much energy we have.