feat(scala): m09 input/app/runtime and m10 extensions with tests
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
bd0c9fcc0c
commit
c6ecb7c013
13 files changed
+448
-6
No files matched your search
@@ -0,0 +1,11 @@
|
||||
package snake
|
||||
|
||||
/** Test helpers shared by the m09 suites. */
|
||||
object M09Helpers:
|
||||
|
||||
/** The m09 program built from classicActions (ticks every 150 ms). The shipped `main` switches to speedActions in m10. */
|
||||
lazy val classicMain: IO[Stream[IO[Unit]]] =
|
||||
IO.randomSeed.map(seed => App.states(seed, App.classicActions).map(App.render))
|
||||
|
||||
/** The shapes an IO draws, in order (interpreted by `IO.trace`). */
|
||||
def drawn(io: IO[Unit]): List[Shape] = IO.trace(io, 0).ops.collect { case Op.Draw(shape) => shape }
|
||||
Reference in new issue
Block a user