lifecycleForFrames

fun lifecycleForFrames(frames: Int, loop: Window.(Int) -> Unit)

Runs a game loop for a specific number of frames.

This is useful for testing or scenarios where you want to limit the number of iterations.

Parameters

frames

The number of frames to run the loop for

loop

The game loop to call for the specified number of frames. The current frame count is provided as an argument.