diff --git a/SimplePriorityQueue/src/testat_g11/SimplePriorityQueue.java b/SimplePriorityQueue/src/testat_g11/SimplePriorityQueue.java index 384bdf3..2dd79db 100644 --- a/SimplePriorityQueue/src/testat_g11/SimplePriorityQueue.java +++ b/SimplePriorityQueue/src/testat_g11/SimplePriorityQueue.java @@ -63,6 +63,17 @@ public class SimplePriorityQueue implements IPriorityQueue } } + // Der Fall 2 Tickets haben die gleiche HöchstPrio + for (int i = 0; i < size; i++) { + if (prioDet.calculate(tickets[i]) == prioDet.calculate(tick) & !tickets[i].equals(tick)) { + if (tick.getBeginOfTicket() != null && tickets[i].getBeginOfTicket() != null) { + if (tick.getBeginOfTicket().after(tickets[i].getBeginOfTicket())) { + tick = tickets[i]; + } + } + } + } + remove(tick); return tick; }