Book Image

Learning Dart

Book Image

Learning Dart

Overview of this book

Table of Contents (19 chapters)
Learning Dart
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

The model for the memory game


When started, the game presents a board with square cells. Every cell hides an image that can be seen by clicking on the cell, but this disappears quickly. You must remember where the images are because they come in pairs. If you quickly click on two cells that hide the same picture, the cells are "flipped over" and the pictures stay visible. The objective of the game is to turn over all pairs of matching images in a very short time.

Note

The code for this project can be downloaded from GitHub using the following command:

git clone git://github.com/dzenanr/educ_memory_game.git

After some thinking, we came up with the following model, which describes the data handled by the application. In our game we have a number of pictures, which could belong to a Catalog. For example, a travel catalog with a collection of photos from our trips or something similar. Furthermore, we have a collection of cells, and each cell is hiding a picture. Also, we have a structure that...