Then I'd keep the three rooms as plain JS data and have one function render whichever room you're in. Each object can carry its text and an optional flag name; keep the flags in one state object. That won't build the whole engine for you, but it keeps the next memory from needing its own special-case code. Small enough to try on one room before rewriting anything.