C++ State Machines

C++ State Machines

Nystrom considers game programming and his example state machine is concerned with the animation and movement of the players character, a heroine. handleInput can only rely on the inputs and not on the state of the Heroine. Here is some code to describe that for one state, can you spot the bug?

Source: beza1e1.tuxen.de