A bot is made up of 4 files.
The .cmd and .sh files contain just path information to the .java file and you will only need to change the code in these files if you rename your java file. The other 2 files are more useful.
The JSON file contain key information about your bot. This include the name, authors, description and country codes. You can add multiple authors and country codes or just one.
Make sure you have now open the JAVA file.
The code in the setColour function will allow you to change the colour of your bot. This is the first step in making your bot more unique from the competition.
This function activates when a round start. Inside this function is a while loop and this is where your main logic will go.
So far the only thing the robot will do will fire. lets introduce some new code to this section
Play around with the code above to add more function to your bot.
For example you could make a bot that moves in a square by moving forward, turning left 90 degrees and repeating that code 4 times
This will need to be done before you can test your bot
Any fire code in the while loop can now be removed
A condition will trigger when a rule is met in the game. There are many in built condition that we can make use of. The one will be using first is the ability to run code if a bot is ever in the line of site of our gun.