Game Development Reference
In-Depth Information
Building the Game Coin Sorter
Thus far we have looked at some of the finer points of getting content onto the screen. In previous
chapters, we explored the role of the controller classes and how they manage the relationship
between data and the view. The last step in creating the game Coin Sorter is combining these
concepts. This section will walk through the life cycle of the CoinController class, touching on the
basic concepts we have explored. Figure 4-6 shows just the area of the screen controlled by the
class CoinController .
Figure 4-6. CoinController's view
In this five-by-five grid of coins, the user can select two coins to trade places. The goal is to create
rows or columns of like coins to create a matching set. When a match is created, the coins are
animated on the screen, and the user's score is increased. The user has 10 turns to make as many
matches as possible. Figure 4-7 shows the life cycle of the game.
 
Search WWH ::




Custom Search