The memory game

The code in the memory game shouldn't challenge us too much because we have done the background research on threads, arrays, sound, and persistence. There will be some new-looking code and we will examine it in detail when it crops up.

Here is a screenshot of our finished game:

The memory game

This is the home screen. It shows the high score, which persists between play sessions and when the device is shut down. It also shows a Play button, which will take the player to the main game screen. Take a look at the following screenshot:

The memory game

The game screen itself ...

Get Android: Game Programming now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.