Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

Learn programming 34: create a grid of objects with nested while loops

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
477 views
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Aug 27, 2011

Fun programming with Processing, episode 34. We have seen in previous episodes how to create many objects at once using a while loop. This time we use a while loop inside a while loop to create a grid of objects. The result is a collection of objects (rectangles or circles in our example) distributed in the screen in a pattern similar to the white and black rectangles in a chess game.
Using a loop inside a loop is something very common in programming, and we will see more examples in coming episodes.

www.funprogramming.org

  • likes, 0 dislikes

Link to this comment:

Share to:
see all

All Comments (1)

Sign In or Sign Up now to post a comment!
  • good job!! congratulation

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more