xxxxxxxxxx
41
var x;
var button;
var input0;
var input1;
var input2;
var input3;
var input4;
var input5;
var input6;
var input7;
var input8;
var input9;
function setup() {
x = false;
button = createButton('GO!');
createP('Fill in all the boxes with words that correspond to their labels, then press GO!');
input0 = createInput('adjective');
input1 = createInput('food');
input2 = createInput('adverb');
input3 = createInput('verb in pass-tense');
input4 = createInput('body part');
input5 = createInput('noun');
input6 = createInput('colour');
input7 = createInput('type of car');
input8 = createInput('name of person in room');
input9 = createInput('noun');
createCanvas(1000, 1000);
}
function changeX() {
x = true
}
function draw() {
button.mousePressed(changeX)
background(255);
if (x) {
text(' There once was an extremely ' + input0.value() + ' person who loved eating ' + input1.value() + ', so much so, that he ' + input2.value() + ' ' + input3.value() + '. Then, he realised that his ' + input4.value() + ' had swelled into the size of a weird ' + input5.value() + '. So he drove to the ER in a nice ' + input6.value() + ' ' + input7.value() + '. The doctor said you could call him Dr. ' + input8.value() + ' and that he, too was having trouble with his ' + input4.value() + '. He said that the best way to get rid of it is simply to rub it with a little peice of ' + input9.value() + '. When you came out, you were very thankful of meeting Dr. ' + input8.value() + '.', 50, 50, 900, 900);
}
}