Improved StateMachine. Added global state. Used shared_ptr to store states. Adjusted tests.
Some playerEntity test progress.