Well another OO way would be to add a state member to the Heroine class and create a state class for every possible state (X,Y,Z). Each state can then be responsible for interpreting the input and transitioning to the next appropriate state (if any)
HSM have been there for a while, being proposed in '84 (!) by David Harel under the name 'statecharts'