GameState class added. Tested and working, but now comes the hard part: Implementing the actual states…