robocode

Class _Robot

Implemented Interfaces:
IBasicRobot, Runnable
Known Direct Subclasses:
Robot

public abstract class _Robot
extends _RobotBase

This class is used by the system, as well as being a placeholder for all deprecated (meaning, you should not use them) calls for Robot.

You should create a Robot instead.

There is no guarantee that this class will exist in future versions of Robocode.

Authors:
Mathew A. Nelson (original)
Flemming N. Larsen (contributor)
Pavel Savara (contributor)
See Also:
Robot

Field Summary

Fields inherited from class robocode._RobotBase

out

Constructor Summary

_Robot()

Method Summary

@Deprecated
String getGunImageName()
Deprecated. This call is not used.
@Deprecated
String getRadarImageName()
Deprecated. This call is not used.
@Deprecated
String getRobotImageName()
Deprecated. This call is not used.
@Deprecated
double getGunCharge()
Deprecated. Use getGunHeat() instead.
@Deprecated
double getLife()
Deprecated. Use getEnergy() instead.
@Deprecated
int getBattleNum()
Deprecated. Use getRoundNum() instead.
@Deprecated
int getNumBattles()
Deprecated. Use getNumRounds() instead.
void
setInterruptible(boolean interruptible)
This call has moved to AdvancedRobot, and will no longer function in the Robot class.
@Deprecated
void setGunImageName(String newGunImageName)
Deprecated. This call is not used.
@Deprecated
void setRadarImageName(String newRadarImageName)
Deprecated. This call is not used.
@Deprecated
void setRobotImageName(String newRobotImageName)
Deprecated. This call is not used.

Methods inherited from class robocode._RobotBase

setOut, setPeer

Constructor Details

_Robot

protected _Robot()

Method Details

String getGunImageName

public @Deprecated String getGunImageName()

Deprecated. This call is not used.

Returns:
the name of the gun image

String getRadarImageName

public @Deprecated String getRadarImageName()

Deprecated. This call is not used.

Returns:
the name of the radar image

String getRobotImageName

public @Deprecated String getRobotImageName()

Deprecated. This call is not used.

Returns:
the name of the robot image

double getGunCharge

public @Deprecated double getGunCharge()

Deprecated. Use getGunHeat() instead.

Returns:
5 - getGunHeat().

double getLife

public @Deprecated double getLife()

Deprecated. Use getEnergy() instead.

Returns:
the robot's current life/energy.

int getBattleNum

public @Deprecated int getBattleNum()

Deprecated. Use getRoundNum() instead.

Returns:
the current round number of the battle

int getNumBattles

public @Deprecated int getNumBattles()

Deprecated. Use getNumRounds() instead.

Returns:
the number of rounds in the current battle

setInterruptible

public void setInterruptible(boolean interruptible)
This call has moved to AdvancedRobot, and will no longer function in the Robot class.
Parameters:
interruptible - true if the event handler should be interrupted if new events of the same priority occurs; false otherwise

void setGunImageName

public @Deprecated void setGunImageName(String newGunImageName)

Deprecated. This call is not used.

Parameters:
newGunImageName - the name of the new gun image

void setRadarImageName

public @Deprecated void setRadarImageName(String newRadarImageName)

Deprecated. This call is not used.

Parameters:
newRadarImageName - the name of the new radar image

void setRobotImageName

public @Deprecated void setRobotImageName(String newRobotImageName)

Deprecated. This call is not used.

Parameters:
newRobotImageName - the name of the new robot body image