xxxxxxxxxx
129
let r;
let fail;
let tootoo;
let three;
let four;
let five;
let success;
let fail1;
let tootoo1;
let three1;
let four1;
let five1;
let success1;
//=========================================
function setup() {
createCanvas(400, 400);
r = int(random(1, 6));
fail = ["Try Again!", "Improbable.", "Rough Day?", "CRITICAL FAILURE!", "arent you unlucky"];
tootoo = ["Eh, could be better", "Try again?", "2's better than 1"];
three = ["Half-way there", "Could do better...", "3 out of 6... hmph."];
four = ["Almost there!", "Above Average.", "Two Thirds Bud Bud"];
five = ["JUST 1 AWAY!", "Good Enough", "Ya did good kid."];
success = ["Right on!", "CRITICAL SUCCESS!", "nice", "congradumilations, u ween", "Look who's a Winner!"];
fail1 = random(fail);
tootoo1 = random(tootoo);
three1 = random(three);
four1 = random(four);
five1 = random(five);
success1 = random(success);
}
//=========================================
function draw() {
background(10);
textSize(20);
textAlign(CENTER);
//=========================================
if (r == 1) {
text(fail1, width / 2, 85);
fill(220);
rect(100, 100, 200, 200, 15);
fill(70 + mouseX, 200 + mouseY, 200);
ellipse(200, 200, 50, 50);
}
//=========================================
if (r == 2) {
text(tootoo1, width / 2, 85);
fill(220);
rect(100, 100, 200, 200, 15);
fill(70 + mouseX, 80 + mouseY, 250);
ellipse(150, 150, 50, 50);
ellipse(250, 250, 50, 50);
}
//=========================================
if (r == 3) {
text(three1, width / 2, 85);
fill(220);
rect(100, 100, 200, 200, 15);
fill(200 + mouseX, 70 + mouseY, 250);
ellipse(200, 200, 50, 50);
ellipse(150, 150, 50, 50);
ellipse(250, 250, 50, 50);
}
//=========================================
if (r == 4) {
text(four1, width / 2, 85);
fill(220);
rect(100, 100, 200, 200, 15);
fill(250 + mouseX, 70 + mouseY, 130);
ellipse(150, 150, 50, 50);
ellipse(250, 250, 50, 50);
ellipse(150, 250, 50, 50);
ellipse(250, 150, 50, 50);
}
//=========================================
if (r == 5) {
text(five1, width / 2, 85);
fill(220);
rect(100, 100, 200, 200, 15);
fill(250 + mouseX, 130 + mouseY, 70);
ellipse(150, 150, 50, 50);
ellipse(250, 250, 50, 50);
ellipse(150, 250, 50, 50);
ellipse(250, 150, 50, 50);
ellipse(200, 200, 50, 50);
}
//=========================================
if (r == 6) {
text(success1, width / 2, 85);
fill(220);
rect(100, 100, 200, 200, 15);
fill(250 + mouseX, 220 + mouseY, 10);
ellipse(150, 150, 45, 45);
ellipse(250, 250, 45, 45);
ellipse(150, 250, 45, 45);
ellipse(250, 150, 45, 45);
ellipse(150, 200, 45, 45);
ellipse(250, 200, 45, 45);
}
print(r);
}
//=========================================
function mousePressed() {
r = round(random(1, 6));
fail = ["Try Again!", "Improbable.", "Rough Day?", "CRITICAL FAILURE!", "arent you unlucky"];
tootoo = ["Eh, could be better", "Try again?", "2's better than 1"];
three = ["Half-way there", "Could do better...", "3 out of 6... hmph."];
four = ["Almost there!", "Above Average.", "Two Thirds Bud Bud"];
five = ["JUST 1 AWAY!", "Good Enough", "Ya did good kid."];
success = ["Right on!", "CRITICAL SUCCESS!", "nice", "congradumilations, u ween", "Look who's a Winner!"];
//=========================================
fail1 = random(fail);
tootoo1 = random(tootoo);
three1 = random(three);
four1 = random(four);
five1 = random(five);
success1 = random(success);
}