added a GameState to manage state so that static functions could be called from other scripts like the player and GUI