robocode
Class _RobotBase
- IBasicRobot, Runnable
public abstract class _RobotBase
This is the base class of all robots used by the system. You should not base
your robots on this class.
You should create a robot that is derived from the
Robot
or
JuniorRobot
class instead.
There is no guarantee that this class will exist in future versions of Robocode.
- Flemming N. Larsen (original)
- Pavel Savara (contributor)
out
public PrintStream out
The output stream your robot should use to print.
You can view the print-outs by clicking the button for your robot in the
right side of the battle window.
Example:
// 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());
}