December 2015
Intermediate to advanced
416 pages
7h 15m
English
CHAPTER 17
![]()
Array-Backed Grids
Games like minesweeper, tic-tac-toe, and many types of adventure games keep data for the game in a grid of numbers. For example, a tic-tac-toe board:

…can use a grid of numbers to represent the empty spots, the O’s, and the X’s like this:

This grid of numbers can also be called a two-dimensional array or a matrix. (Finally, we get to learn about The Matrix.) The values of the numbers in the grid represent what should ...
Read now
Unlock full access