Lab 8

Arrays

In this lab you will use an array to display drawing objects on the screen.

Using 1 1-dimensional array and 1 loop (both provided to you), do the following:

Step 0: Change the array so that it is an array of 64 squares.  Make them small, and draw them all in a single row, immediately adjacent to one another.  Make the squares lightGray.

Step 1: Modify your code so that the 64 squares are larger, and are drawn as an 8 by 8 grid, the dimensions of a chess board.

Step 2: Modify your code so that it actually looks like a chess board, where alternating squares are different colors (lightGray and darkGray, for instance).

Step 3: Change the color of the square in the upper-left hand corner to red.  Have this red square "travel" around the perimeter of the board.  After it leaves a square the square it left should go back to its original color.  For this step you may use additional loops.

Due: 10/13 at 11 AM.  If you only modify one file, you may submit that.  Otherwise, please zip together your files and submit the 1 zip file.