Code Monkey home page Code Monkey logo

robocode-example's Introduction

Using Robocode with IntelliJ

Links

Videos

Robots

  • An example robot is here.
  • The sample robots included in the Robocode distro are here.

Setup

  1. Install Robocode the usual way: download robocode-1.9.3.4-setup.jar from here and run the setup jar to install Robocode into your home directory with:
java -jar robocode-1.9.3.4-setup.jar
  1. Clone this repo to a local directory with:
git clone https://github.com/athenian-programming/robocode-example.git
  1. Make sure you have Java 1.8 installed.

  2. Open the repo with IntelliJ

Check Use auto-import
Group modules: *using explicit module groups
Uncheck Create separate module per source set
Gradle JVM: 1.8

Open Intellij Project

  1. Click on File -> Project Structure... to open the project's structure.
Project SDK: 1.8
Project language level: 8 - Lambdas, type annotations etc.

Project Structure

  1. Select Build -> Build Project to compile the project's java code.

  2. Click on Run -> Edit Configurations..., then click on + and select Application from the list and create a configuration with these values:

Name: Robocode
Main class: robocode.Robocode
VM options: -Xmx512M -Dsun.io.useCanonCaches=false -Ddebug=true
Working directory: /Users/username/robocode 
Use classpath of module: org.athenian.robocode-example.main
JRE: 1.8

Robocode Configuration

  1. Run the newly created configuration to start Robocode.

  2. Once started, select Options -> Preferences -> Development Options on the Robocode app, and add robocode-example/out/production/classes and robocode-example/out/production/resources from the cloned robocode-example repo and click Finish.

Preferences

  1. Start a Robocode battle by going to Robocode and selecting Battle -> New. Add the org.athenian.SimpleRobot, sample.Crazy, and sample.Fire robots and then click Start Battle.

New Battle

robocode-example's People

Contributors

pambrose avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.