All Packages Class Hierarchy This Package Previous Next Index
Class ch.jp.robwar.Robot
java.lang.Object
|
+----ch.jp.robwar.Robot
- public class Robot
- extends Object
- implements Serializable
This contains all information of the robot.
It is maintained by the simulator, which in turn
updates the map.
-
color
-
-
life
-
-
map
-
-
mapImage
-
-
nbRockets
-
-
number
-
-
position
-
-
radius
-
-
Robot(Position, double, Color, int, Map, RobotImage)
-
-
decLife(double)
- Decreases the life index by the value given.
-
getNbRockets()
-
-
getOrientationDeg()
- Returns the orientation of the robot, in degrees
-
getOrientationRad()
- Returns the orientation of the robot, in radians
-
moveBy(double)
- Goes forward the specified distance, returning
whatever stimuli it gets as a result (none in this implementation)
-
setNbRockets(int)
-
-
turnByDeg(double)
- Turns the robot by the specified number of *degrees*
returns whatever stimuli the robot would feel as a result
(none in this implementation)
-
turnByRad(double)
- Turns the robot by the specified number of *radians*
returns whatever stimuli the robot would feel as a result
(none in this implementation)
color
public Color color
radius
public double radius
number
public int number
position
public Position position
mapImage
protected RobotImage mapImage
map
protected Map map
life
public double life
nbRockets
public int nbRockets
Robot
public Robot(Position nPos,
double nOri,
Color col,
int nNum,
Map nMap,
RobotImage img)
getNbRockets
public int getNbRockets()
setNbRockets
public void setNbRockets(int n)
decLife
public Stimuli decLife(double howMuch)
- Decreases the life index by the value given.
turnByDeg
public Stimuli turnByDeg(double rot)
- Turns the robot by the specified number of *degrees*
returns whatever stimuli the robot would feel as a result
(none in this implementation)
turnByRad
public Stimuli turnByRad(double rotation)
- Turns the robot by the specified number of *radians*
returns whatever stimuli the robot would feel as a result
(none in this implementation)
moveBy
public Stimuli moveBy(double sp)
- Goes forward the specified distance, returning
whatever stimuli it gets as a result (none in this implementation)
getOrientationDeg
public double getOrientationDeg()
- Returns the orientation of the robot, in degrees
getOrientationRad
public double getOrientationRad()
- Returns the orientation of the robot, in radians
All Packages Class Hierarchy This Package Previous Next Index