# Timeline check (design.md "Acceptance: timeline"), from # accel_to_mouse.timeline.script. The interaction: flaps by click and by # space at chosen frames, a crash on the second pipe's way, and a click # that starts a new round with a new pipe from the State's generator. A # replay that lost or moved one flap ends with the bird elsewhere. # 1. Record. frames 20 console record 0 frames 40 key space frames 10 click 300 200 frames 25 key space frames 25 click 300 200 await over true frames 10 click 300 200 frames 30 key space frames 20 console save 2 expect over false expect best 0 # 2. Played to the end (one recorded frame per script frame), exactly. console play 0 frames 400 expect-snapshot 2 screenshot .zig-cache/e2e/flappy_bird-played.png # 5. Paused (at the end): `draw` must not move State. frames 30 expect-snapshot 2 # 3. Sought to the end, and to the middle and played on. console seek end expect-snapshot 2 screenshot .zig-cache/e2e/flappy_bird-sought.png # 7. What a seek shows equals what playing showed (draw-side caches). expect-same-screenshot .zig-cache/e2e/flappy_bird-played.png .zig-cache/e2e/flappy_bird-sought.png console seek 800 console pause frames 10 # Paused halfway, then on to the end. console pause frames 30 console pause frames 400 expect-snapshot 2 # 4. Stepped: frame by frame from the start, then back and forth. console seek start console step 100000 expect-snapshot 2 console step -25 console step 25 expect-snapshot 2 # 6. A live pointer move, then the same replay. console stop move 20 20 frames 10 console play 0 frames 400 expect-snapshot 2 console stop