xxxxxxxxxx
48
let words = ["#BOOMER ADVICE", "Berlin Wall", "#Istandwiththebanned", "MakeSomethingCleanSoundDirty", "ByThisTimeNextYear", "LEIRS", "THANK YOU GAME FREAK", "MonbebeUnitedforChange", "DearDonald"];
let word;
let rand;
function preload() {
img1 = loadImage("meme7.jpeg");
img2 = loadImage("meme4.jpeg");
img3 = loadImage("meme9.jpg");
}
function setup() {
createCanvas(500, 500);
background(0);
image(img1, 0, 0, width, height);
fill(250);
textSize(30);
let rand = round(random(words.length - 1));
let word = words[rand];
text(word, 20, 80);
}
function draw() {
if (keyIsPressed) {
if (key == "a") {
image(img1, 0, 0, width, height);
memez();
} else if (key == "s") {
image(img2, 0, 0, width, height);
memez();
} else if (key == "d") {
image(img3, 0, 0, width, height);
memez();
}
}
}
function memez() {
fill(250,0,200);
textSize(30);
let rand = round(random(words.length - 1));
let word = words[rand];
text(word, 20, 80);
}