> show canvas only <


/* built with Studio Sketchpad: 
 *   https://sketchpad.cc
 * 
 * observe the evolution of this sketch: 
 *   https://designuniandes.sketchpad.cc/sp/pad/view/ro.t2$E3Gkcjem/rev.5
 * 
 * authors: 
 *   Juan Sebastian Rivera

 * license (unless otherwise specified): 
 *   creative commons attribution-share alike 3.0 license.
 *   https://creativecommons.org/licenses/by-sa/3.0/ 
 */ 



float x=0;
int direccion=1;

void setup(){
  size(600,400);
}

void draw(){
  background(144,252,252);
  noStroke();
  fill(255,255,0);
  rect(443,226,124,24);
  fill(0);
  rect(445,228,120,20);
  fill(255,255,0);
  text("USAIN BOLT 9,58s", 452, 230, 120, 100);
  fill(0,198,9);
  rect(0,250,600,150);
  fill(255);
  rect(0,260,600,65);
  fill(245,146,31);
  rect(0,265,600,15);
  rect(0,285,600,15);
  rect(0,305,600,15);
  fill(109,66,37);
  rect(x,190,20,20);
  fill(255,248,0);
  rect(x-2,210,25,30);
  fill(0);
  rect(x,240,20,10);
  fill(109,66,37);
  rect(x+5,250,10,20);
  fill(176,224,0);
  rect(x+5,270,12,5);
  fill(255,0,0);
  rect(550,260,10,65);
 
/*  
 if(direccion == 1){
  x=x+1;
 }
 else{
   x=x-1;
}*/

x=x+1*direccion;
if((x>580)||(x<0))
{direccion=direccion*-1;
}
if((x<=0)&&(x<50)){
  x=x+1*direccion;}
if((x>=50)&&(x<500)){
  x=x+6*direccion;}
if((x>=500)&&(x<=600)){
  x=x+2*direccion;}
println(x);
}