I suppose this question is language-agnostic, tho I'm asking it in regards to building an iPhone app that uses the new Game Center API, but please feel free to answer in general software engineering terms.
I'm building a game for the iPhone that takes advantage of the new Game Center capabilities (i.e. Auto-matching, leaderboards, achievements, etc.), but I want to write the game so that it works on all iPhones, including those that don't have Game Center installed and cannot make use of the Game Center capabilities. To do this, Apple recommends the approach...
"We'd recommend making one version of the app which dynamically detects whether Game Center is available and uses it (or not) based on that."
With my current level of programming, the simple approach I would take to implementing this would be to check if whether or not Game Center is available and set a simple boolean flag accordingly. Then use that flag to control the flow of execution throughout the software. I'm sure I could make that work, but because I enjoy learning and enjoy programming, I was wondering if there's a better approach or design pattern for disabling blocks of functionality that aren't supported, along with controlling the flow of execution.
Thanks in advance for your wisdom!