mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-14 03:19:28 +02:00
Update src/data/phase-priority-queue.ts
Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
This commit is contained in:
parent
d576da72d2
commit
c1c66a473b
@ -64,11 +64,12 @@ export abstract class PhasePriorityQueue {
|
||||
if (phaseIndex === -1) {
|
||||
return 0;
|
||||
}
|
||||
do {
|
||||
while (numRemoved < removeCount && phaseIndex !== -1) {
|
||||
this.queue.splice(phaseIndex, 1);
|
||||
numRemoved++;
|
||||
} while (numRemoved < removeCount || (phaseIndex = this.queue.findIndex(phaseFilter)) !== -1);
|
||||
return removeCount;
|
||||
phaseIndex = this.queue.findIndex(phaseFilter);
|
||||
}
|
||||
return numRemoved;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user