jist.swans.runway
Class RunWayCar

java.lang.Object
  extended by 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


Nested Class Summary
static class RunWayCar.RunWayCarStats
           
 
Field Summary
 float acc
           
 java.lang.Integer id
           
protected  int lane
           
 float length
           
protected  float loc
           
 RunWayCar next
           
 RunWayCar prev
           
 byte regime
           
 float speed
           
 float target
           
 
Fields inherited from interface jist.swans.field.Mobility.MobilityInfo
NULL
 
Constructor Summary
RunWayCar(java.lang.Integer id, RunWay rw, int lane, float loc)
           
 
Method Summary
 int checkLan()
          verifie si le véhicule doit changer de voie
 void nextStep()
          Avance d'une étape actualise l'acceleration, sa voie, et fait avancer le véhicule
 void setStats(RunWayCar.RunWayCarStats stats)
           
 java.lang.String toString()
           
 float updateAcceleration()
          actualise l'acceleration courante de la voiture
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

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
Constructor Detail

RunWayCar

public RunWayCar(java.lang.Integer id,
                 RunWay rw,
                 int lane,
                 float loc)
Method Detail

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)