xxxxxxxxxx
40
let button;
let i;
function setup() {
i = 0
button = createButton('please click me')
createElement('body', 'This is an extremely amazing website and there is a BIG surprise if you get to 1000')
createCanvas(2400, 300);
background(255, 0, 255);
}
function draw() {
button.mousePressed(action);
}
function check() {
if (i >= 101 && mouseIsPressed){
i += 899
}
}
function action() {
i += 1;
background(random(255), random(255), random(255));
if (i < 100) {
createElement('body', 'This is just amazingly amazing amounts of amazing amazingness');
} else if (i < 1000) {
createElement('body', 'This is equivalent to all of the ones before saying things that describe this website as amazing and thats ' + (i - 1) + ' by the way.')
} else {
createElement('body', 'Right now youre thinking about how you just pressed the button 1000 times for THIS?!? Or how smart you are for figuring out the shortcut. Or youre thinking: THERE WAS A SHORTCUT?!? Or youre thinking: Nope! you wrong! Me no think never, so HA.')
}
}
function keyPressed() {
if (keyCode === 129){
check()
}
}