> show canvas only <


/* built with Studio Sketchpad: 
 *   https://sketchpad.cc
 * 
 * observe the evolution of this sketch: 
 *   https://designuniandes.sketchpad.cc/sp/pad/view/ro.f9kOG-zWW7X/rev.90
 * 
 * authors: 
 *   Sergio Puentes

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



// This sketch builds on a prior work, "Assignment 1: Form", created by Hernando Barragan
// http://designuniandes.sketchpad.cc/sp/pad/view/ro.BQLmTBYyWiW9K5/rev.1
/* @pjs preload="/static/uploaded_resources/p.15837/Fondo.jpg"; */
/* @pjs preload="/static/uploaded_resources/p.15837/Ficha13.png"; */
/* @pjs preload="/static/uploaded_resources/p.15837/Ficha12.png"; */
/* @pjs preload="/static/uploaded_resources/p.15837/Ficha11.png"; */
/* @pjs preload="/static/uploaded_resources/p.15837/Ficha10.png"; */
/* @pjs preload="/static/uploaded_resources/p.15837/Ficha9.png"; */
/* @pjs preload="/static/uploaded_resources/p.15837/Ficha8.png"; */
/* @pjs preload="/static/uploaded_resources/p.15837/Ficha7.png"; */
/* @pjs preload="/static/uploaded_resources/p.15837/Ficha6.png"; */
/* @pjs preload="/static/uploaded_resources/p.15837/Ficha5.png"; */
/* @pjs preload="/static/uploaded_resources/p.15837/Ficha4.png"; */
/* @pjs preload="/static/uploaded_resources/p.15837/Ficha3.png"; */
/* @pjs preload="/static/uploaded_resources/p.15837/Ficha2.png"; */
/* @pjs preload="/static/uploaded_resources/p.15837/Ficha.png"; */
PImage photo;
PImage ficha1;
PImage ficha2;
PImage ficha3;
PImage ficha4;
PImage ficha5;
PImage ficha6;
PImage ficha7;
PImage ficha8;
PImage ficha9;
PImage ficha10;
PImage ficha11;
PImage ficha12;
PImage ficha13;
int m=0;
int m2=0;
int m3=0;
int m4=0;
int m5=0;
int m6=0;
int m7=0;
int m8=0;
int m9=0;
int m10=0;
int m11=0;
int m12=0;
int m13=0;
int xs = int(random(15,150));
int xs2 = int(random(15,150));
int xs3 = int(random(15,150));
int xs4 = int(random(15,150));
int xs5 = int(random(15,150));
int xs6 = int(random(15,150));
int xs7 = int(random(15,150));
int xs8 = int(random(15,150));
int xs9 = int(random(15,150));
int xs10 = int(random(15,150));
int xs11 = int(random(15,150));
int xs12 = int(random(15,150));
int xs13 = int(random(15,150));
boolean x1d= true;
boolean x2d= false;
boolean x3d= true;
boolean x4d= false;
boolean x5d= true;
boolean x6d= true;
boolean x7d= false;
boolean x8d= true;
boolean x9d= true;
boolean x10d= false;
boolean x11d= true;
boolean x12d= true;
boolean x13d= true;

void setup() {
  size(400, 400);
  photo = loadImage("/static/uploaded_resources/p.15837/Fondo.jpg");
  ficha1 = loadImage("/static/uploaded_resources/p.15837/Ficha.png");
  ficha2 = loadImage("/static/uploaded_resources/p.15837/Ficha2.png");
  ficha3 = loadImage("/static/uploaded_resources/p.15837/Ficha3.png");
  ficha4 = loadImage("/static/uploaded_resources/p.15837/Ficha4.png");
  ficha5 = loadImage("/static/uploaded_resources/p.15837/Ficha5.png");
  ficha6 = loadImage("/static/uploaded_resources/p.15837/Ficha6.png");
  ficha7 = loadImage("/static/uploaded_resources/p.15837/Ficha7.png");
  ficha8 = loadImage("/static/uploaded_resources/p.15837/Ficha8.png");
  ficha9 = loadImage("/static/uploaded_resources/p.15837/Ficha9.png");
  ficha10 = loadImage("/static/uploaded_resources/p.15837/Ficha10.png");
  ficha11 = loadImage("/static/uploaded_resources/p.15837/Ficha11.png");
  ficha12 = loadImage("/static/uploaded_resources/p.15837/Ficha12.png");
  ficha13 = loadImage("/static/uploaded_resources/p.15837/Ficha13.png");
  

}
void draw() {
  background(255);
  image(photo, 0, 0);
 if( m != xs){
  m=m+1;
 }
else if(m==xs){
 m=0;
 xs = int(random(15,200));
 if(x1d){
   x1d=false;
   }
 else if(!x1d){
   x1d=true;
   }
 }
 if(x1d){
  image(ficha1, 0, 0);
   }
 if( m2 != xs2){
  m2=m2+1;
 }
else if(m2==xs2){
 m2=0;
 xs2 = int(random(15,200));
 if(x2d){
   x2d=false;
   }
 else if(!x2d){
   x2d=true;
   }
 }
 if(x2d){
  image(ficha2, 0, 0);
   }
    if( m3 != xs3){
  m3=m3+1;
 }
else if(m3==xs3){
 m3=0;
 xs3 = int(random(15,200));
 if(x3d){
   x3d=false;
   }
 else if(!x3d){
   x3d=true;
   }
 }
 if(x3d){
  image(ficha3, 0, 0);
   }
    if( m4 != xs4){
  m4=m4+1;
 }
else if(m4==xs4){
 m4=0;
 xs4 = int(random(15,200));
 if(x4d){
   x4d=false;
   }
 else if(!x4d){
   x4d=true;
   }
 }
 if(x4d){
  image(ficha4, 0, 0);
   }
    if( m5 != xs5){
  m5=m5+1;
 }
else if(m5==xs5){
 m5=0;
 xs5 = int(random(15,200));
 if(x5d){
   x5d=false;
   }
 else if(!x5d){
   x5d=true;
   }
 }
 if(x5d){
  image(ficha5, 0, 0);
   }
    if( m6 != xs6){
  m6=m6+1;
 }
else if(m6==xs6){
 m6=0;
 xs6 = int(random(15,200));
 if(x6d){
   x6d=false;
   }
 else if(!x6d){
   x6d=true;
   }
 }
 if(x6d){
  image(ficha6, 0, 0);
   }
    if( m7 != xs7){
  m7=m7+1;
 }
else if(m7==xs7){
 m7=0;
 xs7 = int(random(15,200));
 if(x7d){
   x7d=false;
   }
 else if(!x7d){
   x7d=true;
   }
 }
 if(x7d){
  image(ficha7, 0, 0);
   }
    if( m8 != xs8){
  m8=m8+1;
 }
else if(m8==xs8){
 m8=0;
 xs8 = int(random(15,200));
 if(x8d){
   x8d=false;
   }
 else if(!x8d){
   x8d=true;
   }
 }
 if(x8d){
  image(ficha8, 0, 0);
   }
    if( m9 != xs9){
  m9=m9+1;
 }
else if(m9==xs9){
 m9=0;
 xs9 = int(random(15,200));
 if(x9d){
   x9d=false;
   }
 else if(!x9d){
   x9d=true;
   }
 }
 if(x9d){
  image(ficha9, 0, 0);
   }
    if( m10 != xs10){
  m10=m10+1;
 }
else if(m10==xs10){
 m10=0;
 xs10 = int(random(15,200));
 if(x10d){
   x10d=false;
   }
 else if(!x10d){
   x10d=true;
   }
 }
 if(x10d){
  image(ficha10, 0, 0);
   }
    if( m11 != xs11){
  m11=m11+1;
 }
else if(m11==xs11){
 m11=0;
 xs11 = int(random(15,200));
 if(x11d){
   x11d=false;
   }
 else if(!x11d){
   x11d=true;
   }
 }
 if(x11d){
  image(ficha11, 0, 0);
   }
    if( m12 != xs12){
  m12=m12+1;
 }
else if(m12==xs12){
 m12=0;
 xs12 = int(random(15,200));
 if(x12d){
   x12d=false;
   }
 else if(!x12d){
   x12d=true;
   }
 }
 if(x12d){
  image(ficha12, 0, 0);
   }
    if( m13 != xs13){
  m13=m13+1;
 }
else if(m13==xs13){
 m13=0;
 xs13 = int(random(15,200));
 if(x13d){
   x13d=false;
   }
 else if(!x13d){
   x13d=true;
   }
 }
 if(x13d){
  image(ficha13, 0, 0);
   }
 if(x1d&&x2d&&x3d&&x4d&&x5d&&x6d&&x7d&&x8d&&x9d&&x10d&&x11d&&x12d&&x13d){
noLoop();
 }
}