#Nerding Out! ##Robocode
Welcome to the first Ordina J-Technologies Nerding Out event! This first time we will be building robots and battle in various assignments. The assignments will be presented during the day.
This wiki can be used to set up your local environment.
Make sure you have Java 6 or Java 7 set up for building our code.
There are three steps that you need to complete to have the whole setup needed. You'll need to:
- Clone the Git repository
- Setup the project in your favorite IDE
- Configure Robocode to use your compiled classes
You'll need to clone this Git repository
git clone https://github.com/joukestoel/jtech-nerding-out-1.git nerding-out-1
That's it!
- Workspace -> [location_where_you_checked_out_the_nerding-out_project]
- File -> New -> Project
- Java Project -> Project name: your_code_here -> Next
- (The next steps are required to link the source code to the robocode.jar)
- Tab Libraries -> Select 'robocode-sources.jar' -> Click 'Remove'
- Expand 'robocode.jar' -> Select 'Source attachment' -> Click 'Edit' -> Select 'Workspace location' -> In 'Path', select 'Browse' -> Select the 'robocode-source.jar' (in the lib directory)
- Hit 'Finish'
- Import project -> Select '[location_where_you_checked_out_the_nerding-out_project]/your_code_here' -> Hit 'Ok'
- Select 'Create project from existing sources'
- You can now basically keep hitting 'Next' and then hit 'Finish'
- You will be notified that the GIT root is unknown. You can add it to your Version Control configuration (just follow the link in your 'Event Log')
- (The next steps are required to link the source code to the robocode.jar)
- Open the settings of your project (select project in the project explorer and hit CTRL-ALT-SHIFT-s)
- Open the 'Libraries' section
- Remove the 'robocode-sources.jar' as library
- Select the 'robocode.jar' -> Hit '+' -> Select 'Attach Files or Directories' -> Select 'robocode-sources.jar' -> Hit 'Ok'
- Hit 'Ok'
- Select menu 'File' -> 'New project'
- Select 'Java' -> 'Java Project with Existing Sources' -> Hit 'Next'
- Select 'Project Name' -> Think up something nice
- Select 'Project Folder' -> Hit 'Browse' -> Select '[location_where_you_checked_out_the_nerding-out_project]/your_code_here' -> Hit 'Ok' -> Select 'Next'
- In the 'Existing sources' section, select 'Add Folder' -> Select 'src' -> Hit 'Ok'
- Hit 'Finish'
- (The next sesion is to link the library)
- In the 'Projects' outline, select 'Libraries'
- Right mouse click -> Select 'Add JAR/Folder' -> Select '[location_where_you_checked_out_the_nerding-out_project]/your_code_here/lib/robocode.jar' -> Hit 'Ok'
- (The next session is to link the source code to the robocode.jar)
- Right mouse click on the 'robocode.jar' -> Hit 'Edit' -> Hit 'Browse' next to the 'Sources' input field -> Select 'robocode-sources.jar' -> Hit 'Ok' -> Hit 'Ok'
- Start 'Robocode' (Browse to '[location_where_you_checked_out_the_nerding-out_project]/robocode_app' -> double click 'robocode.bat/sh')
- Once 'Robocode' is running, select menu 'Options' -> Select 'Preferences'
- Select tab 'Development options' -> Hit 'Add'
- Select the directory which you have configured as your build output path in your IDE (i.e. [location_where_you_checked_out_the_nerding-out_project]/your_code_here/build/classes or /out/production/your_own_robot or /bin). Watch out! Make sure that you select the directory where the classes are put (this directory should contain the nl/ directory)
- Hit 'Ok'
If all the above steps are succesful you should be able to select the robots that you will create. To check do the following
- Select the 'Battle' menu -> Select 'New'
- You should be able to see the robots in the 'nl.ordina.nerdingout...' packages -> Select the 'ExampleBot' -> hit 'Add'
- Select 'SittingDuck' -> hit 'Add'
- Hit 'Start battle'
You're done! Happy hunting!