int w=0,y=0,z=0,u=0,r=0,x=0,c=0; void setup () { size(1000,600); frameRate(30); } void draw( ){ background(237,170,36); //tan court //Goal fill(215); //set to grey rect(900,50, 20,600); //hoop base rect(890,100, 10,30); //connector fill(250); rect(870,40, 20,120); //white backboard fill(255,133,3); rect(810,130, 60,10); //orange basket //Basketball fill(200, 100, 10); //orange ellipse(20+w,y, 40,40); //base stroke(0,0,0); line(20+w,u, 20+w,z); //vertical groove line(0+w,y, 40+w,y); //horivontal groove if(w<400 == true) { z=560-c; y=580-c; u=600-c; c=(c+5)%60; //drible the ball } if(w>400 == true) { z=560-x; y=580-x; u=600-x; x=x+10; //shoot up } if(w>500 == true){ z=15; y=35; u=55; w=w+4; //top of the arch } if(w>612 == true) { z=15+r; y=35+r; u=55+r; w=w+4; r=r+3; //goes through hoop } if(w>808 == true){ z=95+r; y=115+r; u=135+r; w=805; r=r+2; //falls to ground } w=w+2; }