TrafficSim/app/src/main/java/de/hems/trafficsim/Vehicle.java

36 lines
755 B
Java
Raw Normal View History

package de.hems.trafficsim;
public class Vehicle {
protected float position;
protected float curVelocity;
protected float maxVelocity;
public void setForerunner(Vehicle forerunner) {
this.forerunner = forerunner;
}
protected Vehicle forerunner;
public float getPosition() {
return position;
}
public float getCurVelocity() {
return curVelocity;
}
protected float brakeProp;
public Vehicle(float position, float maxVelocity, float brakeProp) {
this.position = position;
this.maxVelocity = maxVelocity;
this.brakeProp = brakeProp;
this.curVelocity = 0;
this.forerunner = null;
}
public void timeElapse(float timeStep) {
}
}