< Previous | Contents | Next >
As you’ve seen, sequences are great for games. You can use them in the form of a string to store a player’s name, or you can use them in the form of an array to store a list of items in an RPG. But sometimes part of a game cries out for more than a linear list of things. Sometimes part of a game literally requires more dimension. For example, while you could represent a chessboard with a 64-element array, it really is much more intuitive to work with it as a two- dimensional entity of 8 8 elements. Fortunately, you can create an array of two or three (or even more) dimensions to best fit your game’s needs.