float x,y,t,b,X,Y,U;int[] p={0,0};int[] q={0,0,400,470,550,650,900,1100,1300,1500};int[] Q={0,480,400,350,400,350,330,300,270,240};int[] h={20,5000,20,20,20,90,30,30,30,99};int[] j={500,20,99,140,99,90,30,30,30,260};void setup(){size(500,500);noStroke();t=millis();}void draw(){if(x>1300){x=0;int G=millis();if((G-t)<b||b<1){b=(G-t);}t=G;}background(0);textSize(18);fill(255);text("Use arrow keys to move. Get to end fast.",99-x,350-y);fill(0,200,200);text("Time:"+(int)(millis()-t)/1000+" Best:"+(int)(b/1000),20,40);rect(235,235,30,30);for(int i=0;i<10;i++){fill(255);rect(q[i]-x,Q[i]-y,h[i],j[i]);}y-=Y;Y-=.5;y-=2;if(F()){y+=Y;Y=0;}y-=-2;if(p[0]==1){X-=1;}if(p[1]==1){X+=1;}X*=.9;x+=X;y+=-2;if(F()){x-=X;X=0;}y-=-2;}void keyPressed(){U=keyCode;if(U==38&&F()){Y=10;}if(U==37){p[0]=1;}if(U==39){p[1]=1;}}void keyReleased(){U=keyCode;if(U==37){p[0]=0;}if(U==39){p[1]=0;}}boolean F(){boolean r=false;for(int i=0;i<10;i++){r=r||((265>q[i]-x&&265>Q[i]-y&&235<q[i]-x+h[i]&&235<Q[i]-y+j[i]));}return(r);}