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)
- View Presentation - Robocode.pptx
- Download Java http://java.com/en/download
- Download Robocode - http://robocode.sourceforge.net/download
- robocode-1.9.2.6-setup.jar
- robocode.dotnet-1.9.2.6-setup.jar
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);
}
}
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);
}
}
}