xxxxxxxxxx
149
let r;
let x;
let y;
function setup() {
createCanvas(400, 400);
r = round(random(1, 15))
x = 0
y = 0
}
function draw() {
background(172, 242, 220);
noStroke();
textSize(32);
textAlign(CENTER, BASELINE);
textStyle(BOLD);
ellipse(x, 50, 100, 100);
fill(205, 255, 156, 100);
ellipse(x, x, 200, 200);
fill(250, 216, 182, 255);
ellipse(x, 400, 90, 90);
fill(206, 205, 250, 255);
ellipse(300, x, 80, 70);
fill(250, 192, 247, 255);
ellipse(200, x, 20, 20);
fill(250, 192, 202, 255);
ellipse(390, x, 20, 20);
fill(192, 245, 250);
ellipse(90, x, 90, 90);
fill(255, 242, 184, 150);
ellipse(x, 300, 50, 50);
fill(194, 182, 252);
ellipse(x, x, 20, 20);
fill(255, 255, 255, 255);
if (x < width) {
x = x + 1;
} else if (x == width) {
x = 0;
}
if (r == 1) {
text("20 pushups", height / 2, width / 2);
text("1 minute", 200, 320);
}
if (r == 2) {
text("15 squats", width / 2, height / 2);
text("1 minute", 200, 320);
}
if (r == 3) {
text("20 lounges", width / 2, height / 2);
text("1 minute", 200, 320);
}
if (r == 4) {
text("15 bicep curls", width / 2, height / 2);
text("1 minute", 200, 320);
}
if (r == 5) {
text("15 dumbbell rows", width / 2, height / 2);
text("1 minute", 200, 320);
}
if (r == 6) {
text("stretch your lower body", width / 2, height / 2);
text("1 minute", 200, 320);
}
if (r == 7) {
text("stretch your upper body", width / 2, height / 2);
text("1 minute", 200, 320);
}
if (r == 8) {
text("10 deadlifts", width / 2, height / 2);
text("1 minute", 200, 320);
}
if (r == 9) {
text("plank", width / 2, height / 2);
text("1 minute", 200, 320);
}
if (r == 10) {
text("10 burpees", width / 2, height / 2);
text("1 minute", 200, 320);
}
if (r == 11) {
text("rest", width / 2, height / 2);
text("1 minute", 200, 320);
}
if (r == 12) {
text("30 situps", width / 2, height / 2);
text("1 minute", 200, 320);
}
if (r == 13) {
text("10 bicep curls", width / 2, height / 2);
text("1 minute", 200, 320);
}
if (r == 14) {
text("wallsit", width / 2, height / 2);
text("1 minute", 200, 320);
}
if (r == 15)
text("thirty calf raises", width / 2, height / 2);
text("1 minute", 200, 320);
}
function mousePressed() {
r = round(random(1, 15));
}