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.


Variable Index

 o color
 o life
 o map
 o mapImage
 o nbRockets
 o number
 o position
 o radius

Constructor Index

 o Robot(Position, double, Color, int, Map, RobotImage)

Method Index

 o decLife(double)
Decreases the life index by the value given.
 o getNbRockets()
 o getOrientationDeg()
Returns the orientation of the robot, in degrees
 o getOrientationRad()
Returns the orientation of the robot, in radians
 o moveBy(double)
Goes forward the specified distance, returning whatever stimuli it gets as a result (none in this implementation)
 o setNbRockets(int)
 o 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)
 o 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)

Variables

 o color
 public Color color
 o radius
 public double radius
 o number
 public int number
 o position
 public Position position
 o mapImage
 protected RobotImage mapImage
 o map
 protected Map map
 o life
 public double life
 o nbRockets
 public int nbRockets

Constructors

 o Robot
 public Robot(Position nPos,
              double nOri,
              Color col,
              int nNum,
              Map nMap,
              RobotImage img)

Methods

 o getNbRockets
 public int getNbRockets()
 o setNbRockets
 public void setNbRockets(int n)
 o decLife
 public Stimuli decLife(double howMuch)
Decreases the life index by the value given.

 o 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)

 o 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)

 o moveBy
 public Stimuli moveBy(double sp)
Goes forward the specified distance, returning whatever stimuli it gets as a result (none in this implementation)

 o getOrientationDeg
 public double getOrientationDeg()
Returns the orientation of the robot, in degrees

 o getOrientationRad
 public double getOrientationRad()
Returns the orientation of the robot, in radians


All Packages  Class Hierarchy  This Package  Previous  Next  Index