(day: number, tick: number)
| 16 | } |
| 17 | |
| 18 | releaseUpTo(day: number, tick: number): SimulationEvent[] { |
| 19 | const toRelease: SimulationEvent[] = []; |
| 20 | const remaining: SimulationEvent[] = []; |
| 21 | |
| 22 | for (const e of this.buffer) { |
| 23 | if (e.gameDay < day || (e.gameDay === day && e.gameTick <= tick)) { |
| 24 | toRelease.push(e); |
| 25 | this.emittedIds.add(e.id); |
| 26 | } else { |
| 27 | remaining.push(e); |
| 28 | } |
| 29 | } |
| 30 | |
| 31 | this.buffer = remaining; |
| 32 | return toRelease; |
| 33 | } |
| 34 | |
| 35 | get length(): number { |
| 36 | return this.buffer.length; |
nothing calls this directly
no outgoing calls
no test coverage detected