some tiny changes to make boolean gameOn a part of the class State