Robocode @ YorkCodeDojo

Robocode is a programming game, where the goal is to develop a robot battle tank to battle against other tanks in Java or .NET. The robot battles are running in real-time and on-screen. Robocode Site

Robocode runs on the Java Runtime but bots can be developed in Java or any language that is compiled down to IL (C#, F#, VB.NET)

Battles (16 Nov 2016)

Battle 1

Battle 1 @ York Code Dojo

Battle 2

Battle 2 @ York Code Dojo

Get started

Write a bot

Java example

package example;

import robocode.HitByBulletEvent;
import robocode.Robot;
import robocode.ScannedRobotEvent;

public class MyBot extends Robot {

    public void run() {

        while (true) {
            ahead(100);
            turnRight(90);
            scan();
        }
    }

    public void onScannedRobot(ScannedRobotEvent e) {
        fire(1);
    }
}   

C# example

using Robocode;

namespace Example
{
    public class MyBot : Robot
    {
        public override void Run()
        {
            for (;;)
            {
                Ahead(100);
                TurnRight(90);
                Scan();
            }
        }

        public override void OnScannedRobot(ScannedRobotEvent e)
        {
            Fire(1);
        }
    }
}

Resources