4. Brain Games: Memory and Deduction


Arrays and Data Objects

Memory Game

Deduction Game

In the preceding chapter, we looked at a game that had a single setup of a game board, and you played until you cleared the board. However, many games have more than one setup. These games create a situation for the player to deal with, then the player gets to take action, and then the next situation is set up. You can think of these as turn-based games.

In this chapter, we look at two such games: memory and deduction. The first game asks the player to watch and repeat a sequence. Each turn, the sequence gets longer, until the player eventually can’t ...

Get ActionScript 3.0 Game Programming University, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.