mirror of
https://github.com/davidalves04/Trabalho-Pratico-SD.git
synced 2025-12-08 20:43:32 +00:00
Fix Intersection Destination - Doubled Advance
This commit is contained in:
@@ -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();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user