xxxxxxxxxx
let index = 0;
let index1 = 1;
let index2 = 2;
let critters = ["ʕ •ᴥ•ʔ", "ฅ^•ﻌ•^ฅ", " ₍ᐢ ̥ ̞ ̥ᐢ₎ ♥", "(ᵔᴥᵔ)"];
function setup() {
createCanvas(400, 400);
winnerBanner = loadImage('SlotMachineBanner.png');
}
function draw() {
background(205, 231, 225);
textAlign(CENTER);
textSize(30);
text(critters[index], width/2, height/2);
textAlign(RIGHT);
text(critters[index1], 100, 200);
textAlign(LEFT);
text(critters[index2], 300, 200);
if (index == index1 && index1 == index2) {
image(winnerBanner, 0, 100, 400)
}
}
function mouseClicked() {
index++;
if (index == 4) {
index = round(random(0,3));
index1 = round(random(0, 3));
index2 = round(random(0, 3));
}
}