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 }