public abstract class _RobotBase extends Object implements IBasicRobot, Runnable
Robot
, AdvancedRobot
,
JuniorRobot
, TeamRobot
, or RateControlRobot
class instead.Robot
,
JuniorRobot
,
AdvancedRobot
,
TeamRobot
,
RateControlRobot
Modifier and Type | Field and Description |
---|---|
PrintStream |
out
The output stream your robot should use to print.
|
Modifier and Type | Method and Description |
---|---|
protected void |
finalize()
Called by the system to 'clean up' after your robot.
|
void |
setOut(PrintStream out)
Do not call this method!
This method is called by the game when setting the output stream for your
robot.
|
void |
setPeer(IBasicRobotPeer peer)
Do not call this method! Your robot will simply stop interacting with
the game.
|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getBasicEventListener, getRobotRunnable
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()); }
protected final void finalize() throws 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 gameCopyright © 2015. All rights reserved.