com.ibm.rally
Interface ICar
- All Superinterfaces:
- IObject
- All Known Implementing Classes:
- Car
- public interface ICar
- extends IObject
This interface is used by all cars on the track. It allows you to
find information about the other cars in your match.
getChangeInHeading
public int getChangeInHeading()
- Returns the current change of heading of the car, in degrees per turn.
This method returns a positive number if the car is turning right, and
a negative number if the car is turning left.
- Returns:
- int
getFuel
public int getFuel()
- Returns the amount of fuel remaining in the car.
- Returns:
- int
getHeading
public int getHeading()
- Return the car's heading, in degrees.
- Returns:
- int
getName
public java.lang.String getName()
- Returns the name of the car.
- Returns:
- java.lang.String
getNumberOfSpareTires
public int getNumberOfSpareTires()
- Returns the number of spare tires currently available to be
thrown from this car.
- Returns:
- int
getPoints
public int getPoints()
- Returns the number of points that this car has accumulated
during this match.
- Returns:
- int
getOrganization
public java.lang.String getOrganization()
- Returns the name of the car's organization.
- Returns:
- java.lang.String
getSpeed
public double getSpeed()
- Return the car's current speed, in units per turn. This method
returns the speed in the direction in which the car is heading,
so the car may move (e.g. as the result of being hit sideways
by another car) without the speed changing. This method will
return a negative value if the car is going backwards.
- Returns:
- double
isInProtectMode
public boolean isInProtectMode()
- Returns true if the car is in protect mode.
- Returns:
- boolean