//nolint:testpackage // white-box tests reach unexported state (approved 2026-07-07) package game // testTerm is a headless Terminal for tests: rendering is a no-op and // input plays a script, then alternates space/newline so that --More-- // and [Press return] prompts never block. type testTerm struct { input []byte pos int tick int } func (t *testTerm) Render(*Window) {} func (t *testTerm) Fini() {} // Interrupt has nothing to wake: this terminal's ReadChar never blocks. // The blocking case has its own fake, blockingTerm in autosave_test.go. func (t *testTerm) Interrupt() {} func (t *testTerm) ReadChar() (byte, bool) { if t.pos < len(t.input) { c := t.input[t.pos] t.pos++ return c, true } t.tick++ if t.tick%2 == 0 { return '\n', true } return ' ', true }