if-else in iOS GameCenter refactored to be more readable