jist.swans.runway
Class RunWayCar
java.lang.Object
jist.swans.runway.RunWayCar
- All Implemented Interfaces:
- jist.swans.field.Mobility.MobilityInfo
public class RunWayCar
- extends java.lang.Object
- implements jist.swans.field.Mobility.MobilityInfo
Fields inherited from interface jist.swans.field.Mobility.MobilityInfo |
NULL |
Constructor Summary |
RunWayCar(java.lang.Integer id,
RunWay rw,
int lane,
float loc)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
id
public java.lang.Integer id
loc
protected float loc
lane
protected int lane
target
public float target
speed
public float speed
acc
public float acc
regime
public byte regime
length
public float length
prev
public RunWayCar prev
next
public RunWayCar next
RunWayCar
public RunWayCar(java.lang.Integer id,
RunWay rw,
int lane,
float loc)
updateAcceleration
public float updateAcceleration()
- actualise l'acceleration courante de la voiture
- Returns:
- la nouvelle acceleration
checkLan
public int checkLan()
- verifie si le véhicule doit changer de voie
- Returns:
- le numéro de la nouvelle voie, -1 si y a pas eu de changement
nextStep
public void nextStep()
- Avance d'une étape
actualise l'acceleration, sa voie, et fait avancer le véhicule
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
setStats
public void setStats(RunWayCar.RunWayCarStats stats)