We have covered a lot of ground in a short period of time, and we've covered more than one approach to some of the challenges this game presents to us. We have learned how to control a grid of gems with the appearance of gravity (in other words, filling in holes), we have learned how to match by using nested for loops. We have also learned how to check for matches and how to check for predictive matches using a "C-style" array without forcing ourselves to use C-style arrays throughout the code. Finally, we addressed the idea of artificial randomness to give the player an ongoing game experience without risking a "no more moves" situation.
The code bundle for this chapter also includes both scoring and a progress timer, which we saw traces of but didn't really discuss here. The implementation is very simple, so we leave it to you, the reader, to explore these features on your own. The example "tests" contained within the sample projects included with the cocos2d download are a great...