Game Development Reference
In-Depth Information
Figure 14.5
A conceptual image of a two-dimensional array.
Figure 14.6
A conceptual image of a three-dimensional array.
This declaration will create an int -based array with five array slots assigned to
the array named salary . By default, all slots are set to 0.
Understanding Decisions
Making a decision is important in programming. You might want to determine
what value a user has typed in at the keyboard or what their favorite weapon is in
a game. To do this, you need to be able to make decisions based on information
you have been given. To make such decisions in code, you can use the following:
If: If something is true, do something (such as add two values, remove
health, and so on).
n
Search WWH ::




Custom Search