Skip to content

Commit

Permalink
fix logic
Browse files Browse the repository at this point in the history
  • Loading branch information
sebhoerl committed May 27, 2024
1 parent 735413a commit 074dab3
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,10 @@ private boolean updatePickupRequests(double now) {
}

var enterIterator = enterTimes.entrySet().iterator();
int availableCapacity = vehicle.getCapacity() - onboard;

while (enterIterator.hasNext()) {
var entry = enterIterator.next();
int availableCapacity = vehicle.getCapacity() - onboard;

if (entry.getValue() <= now) {
int requiredCapacity = pickupRequests.get(entry.getKey()).getPassengerCount();
Expand Down

0 comments on commit 074dab3

Please sign in to comment.