|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectrobocode._RobotBase
public abstract class _RobotBase
This is the base class of all robots used by the system. You should not inherit your robot on this class.
You should create a robot that is derived from theRobot
, AdvancedRobot
,
JuniorRobot
, TeamRobot
, or RateControlRobot
class instead.
Robot
,
JuniorRobot
,
AdvancedRobot
,
TeamRobot
,
RateControlRobot
Field Summary | |
---|---|
PrintStream |
out
The output stream your robot should use to print. |
Method Summary | |
---|---|
protected void |
finalize()
Called by the system to 'clean up' after your robot. |
void |
setOut(PrintStream out)
Do not call this method! |
void |
setPeer(IBasicRobotPeer peer)
Do not call this method! |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface robocode.robotinterfaces.IBasicRobot |
---|
getBasicEventListener, getRobotRunnable |
Methods inherited from interface java.lang.Runnable |
---|
run |
Field Detail |
---|
public PrintStream out
// Print out a line each time my robot hits another robot public void onHitRobot(HitRobotEvent e) { out.println("I hit a robot! My energy: " + getEnergy() + " his energy: " + e.getEnergy()); }
Method Detail |
---|
protected final void finalize() throws Throwable
finalize
in class Object
Throwable
public final void setOut(PrintStream out)
setOut
in interface IBasicRobot
out
- the new output print stream for this robotpublic final void setPeer(IBasicRobotPeer peer)
setPeer
in interface IBasicRobot
peer
- the robot peer supplied by the game
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |