MCPcopy
hub / github.com/feichao93/battle-city / iter

Method iter

app/utils/Timing.ts:49–64  ·  view source on GitHub ↗
(handler: (v: V) => Iterable<any>)

Source from the content-addressed store, hash-verified

47 }
48
49 *iter(handler: (v: V) => Iterable<any>) {
50 let acc = 0
51 let target = 0
52 for (const { t, v } of this.array) {
53 yield* handler(v)
54
55 target += t
56 while (true) {
57 const { delta }: actions.Tick = yield take(actions.A.Tick)
58 acc += delta
59 if (acc >= target) {
60 break
61 }
62 }
63 }
64 }
65}

Callers 15

isTankCollidedWithBricksFunction · 0.45
isTankCollidedWithSteelsFunction · 0.45
isTankCollidedWithRiversFunction · 0.45
convertToBricksFunction · 0.45
convertToSteelsFunction · 0.45
destroySteelsFunction · 0.45
destroyBricksFunction · 0.45
flickerSagaFunction · 0.45
explosionFromTankFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected