Skip to content
This repository has been archived by the owner on May 3, 2024. It is now read-only.
/ Robocode Public archive

This repository contains the source code for the "Niffler" robot in the Robocode game. Robocode is a programmable robot combat platform where developers can use Java to create their own robots and compete against other robots in a virtual arena.

License

Notifications You must be signed in to change notification settings

eskopp/Robocode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Robocode

Install

Download GitHub Repository

git clone --recursive https://github.com/eskopp/Robocode.git

Install RoboCode

I recommend that you install Robocode in the following directory.

  • Windows
    C:\robocode
  • Linux / Ubuntu
    /usr/games/robocode

Java Code

Basic Project

The project does not need a main function, so it can be a bit complicated to build artifacts in different interpreters.

  • Example
import robocode.*;

public class MyBot extends Robot {

    // The run method is called when the battle starts
    public void run() {
         // ...
    }

}

Build Class file

cd Niffler 
javac -cp robocode.jar Niffler.java

Install Bot

  • Ubuntu folder:
    ~/.robocode/robots
  • Windows folder:
    C:\robocode\robots

Windows Workflow

  • Window:
    @echo off
    cd Niffler
    javac -cp robocode.jar Niffler.java 
    copy /Y Niffler.class ../Niffler.class
    :: Basic installation
    copy /Y Niffler.class C:\robocode\robots\Niffler.class
  • Linux:
        cd Niffler
        javac -cp robocode.jar Niffler.java 
        cp Niffler.class ../Niffler.class
        cp Niffler.class ~/.robocode/robots/

Robocode

New Battle

New-Battle

Battle

Battle

History

About

This repository contains the source code for the "Niffler" robot in the Robocode game. Robocode is a programmable robot combat platform where developers can use Java to create their own robots and compete against other robots in a virtual arena.

Topics

Resources

License

Stars

Watchers

Forks