weirdie-IterationExercise

var boolDoRefresh;
 
function setup() {
  createCanvas(400, 400);
  background(21, 62, 71);
  boolDoRefresh = true;
}
 
function draw() {
  if (boolDoRefresh) {
 
    background(21, 62, 71);
    noStroke();
 
    for (var r = 0; r < 8; r++)
    {
      for (var c = 0; c < 8; c++)
      {
    		var wow = int(random(0,12));
        if(wow == 0)
        {
          fill(28, 229, 242);
          ellipse(r*46+40, c*46+40, 40, 40);
        }
        else
        {
          fill(24, 191, 179);
          rect(r*46+20, c*46+20, 40, 40);
        }
      }
    }
    boolDoRefresh = false;
  }
}
 
function mousePressed() {
  boolDoRefresh = true;
}