To identify the bots in the game we suggest that you follow the conventions [Your Initials].[Bot Name] (where [Your Initials] is really anything that identifies you uniquely)
- Fork this repository
- Edit the
Redgate.BattleBot_1.0project and rename the assembly to[Your Initials].[BotName]_1.0 - You should find an example bot inside the
BattleBot.cs- either edit this file
- Change the namespace to be
[Your Initials] - Change the class name to be
[BotName]
- Change the namespace to be
- or create a new class called
[BotName]- Give it a namespace of
[Your initials]
- Give it a namespace of
- either edit this file
- Build
You should now be ready to experiment on different behaviours and approaches.
You are going to need to have downloaded and installed:
(obviously you will need a JRE - I know, sorry, but maybe if you are using Rider you might already have one)
By default these install ino C:\robocode, so to run the battle UI:
- Open a command prompt
- Go to
C:\robocode - run
robocode.bat
You should then magically have a UI for running the battles. To add your dll to the system:
- Go to
Options->Preferences - Select the Development Preferences tab
- Click Add
- Select the directory containing your assembly
NOTE: You should be able to rebuild your robot between battles without having to restart the app
To run a battle:
- Go to
Battle->New - You should see your initials/unique identifier in the packages list
- You should see your bot in the robots list
- Add your robot and as many opponents as you care about
- Click Start Battle