Пример #1
0
 public void trafficChangeLane(Lane l, Car c, Lane nl)
 {
     Car tempCar = c;
     l.removeCar(c);
     nl.addCar(tempCar);
 }
Пример #2
0
 public void turn(Lane turningLane, Lane originatingLane, int lanePosition)
 {
     originatingLane.removeCar(this);
     this.lanePosition = lanePosition;
     turningLane.addCar(this);
 }