added a method for checking if/how the game is over