added method for detecting if a game is legal