Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int x = 0;
- int y = 0;
- void setup(){
- size(300,300);
- }
- void draw(){
- for(int i = 1; i < 5; i++ ){
- int result = i % 2;
- if(result == 0){
- fill(255);
- }else if (result == 1){
- fill(0);
- }
- rect(x,y,50,50);
- x+=50;
- if(x>300){
- x=0;
- y+=50;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement