Added a class to wrap checking if the game is over