Implemented changing game state on finishing the game