making the block array

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

making the block array

dmoeller
I am trying to make an array of rectangles on the screen. 8 columns wide and 4 rows tall. It is only drawing 1 row. Here is my code:

                //while loops for making hte block array
                while (row < 4)
                {
                        while (col < 8)
                        {
                                let block = Block.new(15+(60*col), 10+(30*row), 60);
                                let col = col + 1;
                        }
                        let row = row + 1;
                }
        return this;

Please help
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: making the block array

dmoeller
nevermind, Im trying to make an Array variable now so those while loops will be different. Please ignore this post.
Loading...