GithubHelp home page GithubHelp logo

eskopp / robocode Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 1.03 MB

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.

Home Page: https://robocode.sourceforge.io/

License: MIT License

Java 80.05% Batchfile 14.81% Shell 5.14%
robocode java java-20

robocode's Introduction

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

robocode's People

Contributors

dependabot[bot] avatar eskopp 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.