Fix Intersection Destination - Doubled Advance

This commit is contained in:
2025-11-02 23:55:37 +00:00
parent 340e436063
commit 0c256ad6f5

View File

@@ -114,8 +114,8 @@ public class Intersection {
public void receiveVehicle(Vehicle vehicle) { public void receiveVehicle(Vehicle vehicle) {
totalVehiclesReceived++; totalVehiclesReceived++;
// Advance route since vehicle just arrived at this intersection // Note: Route advancement is handled by SimulationEngine.handleVehicleArrival()
vehicle.advanceRoute(); // before calling this method, so we don't advance here.
String nextDestination = vehicle.getCurrentDestination(); String nextDestination = vehicle.getCurrentDestination();