Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- float x = 1;
- float y = 1;
- void setup() {
- size(500, 500);
- background(#FFFFFF);
- }
- void draw() {
- float r = random(0, 255);
- float g = random(0, 255);
- float b = random(0, 255);
- fill(r, g, b);
- for (int i = 0; i < 8; i++) {
- rect(x, y, 50, 50);
- x += 50;
- if (x >= 500) {
- x = 0;
- y += 50;
- }
- return;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement