|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IJuniorRobotPeer
The junior robot peer for junior robot types like JuniorRobot
.
IBasicRobotPeer
,
IStandardRobotPeer
,
IAdvancedRobotPeer
,
ITeamRobotPeer
Method Summary | |
---|---|
void |
turnAndMove(double distance,
double radians)
Moves this robot forward or backwards by pixels and turns this robot right or left by degrees at the same time. |
Methods inherited from interface robocode.robotinterfaces.peer.IBasicRobotPeer |
---|
execute, fire, getBattleFieldHeight, getBattleFieldWidth, getBodyHeading, getBodyTurnRemaining, getCall, getDistanceRemaining, getEnergy, getGraphics, getGunCoolingRate, getGunHeading, getGunHeat, getGunTurnRemaining, getName, getNumRounds, getOthers, getRadarHeading, getRadarTurnRemaining, getRoundNum, getTime, getVelocity, getX, getY, move, rescan, setBodyColor, setBulletColor, setCall, setDebugProperty, setFire, setGunColor, setRadarColor, setScanColor, turnBody, turnGun |
Method Detail |
---|
void turnAndMove(double distance, double radians)
distance
parameter is set to a positive value, it
means that the robot is set to move forward, and a negative value means
that the robot is set to move backward. If set to 0, the robot will not
move, but will be able to turn.
radians
parameter is set to a positive value, it means
that the robot is set to turn to the right, and a negative value means
that the robot is set to turn to the left. If set to 0, the robot will
not turn, but will be able to move.
distance
- the distance to move measured in pixels.
If distance
> 0 the robot is set to move forward.
If distance
< 0 the robot is set to move backward.
If distance
= 0 the robot will not move anywhere, but just
finish its turn.radians
- the amount of radians to turn the robot's body.
If radians
> 0 the robot's body is set to turn right.
If radians
< 0 the robot's body is set to turn left.
If radians
= 0 the robot's body is set to stop turning.move(double)
,
turnBody(double)
,
getBodyHeading()
,
getX()
,
getY()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |