xxxxxxxxxx
31
var phrase = []; //array
var count = 0;
var peopleInPrison = true;
function setup() {
createCanvas(400, 400);
phrase.push('IF');
phrase.push('PEOPLE');
phrase.push('ARE');
phrase.push('IN');
phrase.push('PRISON');
textAlign(CENTER, CENTER);
}
function abolition() {
if (peopleInPrison == true) {
print('THEN NO ONE IS FREE');
}
}
function draw() {
background('blue');
textSize(40);
fill(250);
text(phrase[Math.floor(count)], width / 2, height / 2);
count = count + .03; //increment
if (count > phrase.length) {
count = 0; //index of the phrase
}
abolition();
}