Robocode 2
From CompSciWiki
COMP 1010 Home > Back to Extra Labs
IntroductionRobocode 2
|
---|
Extra Labs: Robocode, Part II
In this lab we will explore the Robot class more deeply and examine all of the different methods that the robot can call. You will become more familiar with the API for the Robot class. You will also explore the downloading of robots that others have created and testing your best creation against the world.
Installation
Building starting robot
package robocode2; import robocode.*; public class Robocode2 extends Robot { public void run() { // Robot main loop while(true) { turnGunRight(360); } } //onScannedRobot: What to do when you see another robot public void onScannedRobot(ScannedRobotEvent e) { fire(1); } }