Refined player class

The player update method now uses a single state machine to handle
actions.  It works, but the code still needs to be refined some.