xxxxxxxxxx
61
let messages = ['YES', 'NO', 'GREAT', 'WHATEVER', 'SUCCESS', 'FAILURE'];
let count = 0;
function setup() {
createCanvas(600, 600);
background('skyblue');
//clouds
fill('white');
noStroke();
ellipse(470, 28, 60, 40);
ellipse(500, 30, 60, 40);
ellipse(530, 35, 60, 40);
ellipse(540, 39, 60, 40);
ellipse(545, 51, 60, 40);
ellipse(535, 55, 60, 40);
ellipse(528, 57, 60, 40);
ellipse(505, 60, 40, 40);
ellipse(480, 60, 60, 40);
ellipse(450, 50, 30, 30);
//bricks
fill('brown');
stroke('white');
let posY = 100;
let posX = 500;
while (posY < 600) {
posX = (posX * -1) + 25;
while (posX < 600) {
rect(posX, posY, 50, 50);
posX = posX + 50;
}
posY = posY + 50;
}
}
function draw() {
textSize(32);
stroke(0);
if (count < 200) {
let i = 0;
while (i < 6) {
if (i % 2 == 0)
fill(0, 102, 153);
else
fill(205, 92, 92);
text(messages[i], random(-10, 600), random(125, 600));
i = i + 1;
}
}
else {
background(0);
textSize(32);
stroke(0);
text("STOP OVERTHINKING", 120, 300);
}
count = count + 1;
}