HTML and CSS Reference
In-Depth Information
Listing 7.14. game.js—Shield setup
Your shield-building process requires a 2D array. It'll have four shields with eight pieces
inside each. This data is then translated into physical objects by passing it to build() .
Notice that you'll need to generate the x and y attributes dynamically, as shown in the fol-
lowing listing.
Search WWH ::




Custom Search