xxxxxxxxxx
366
var impressionist = 10
var lateral = 10
var question = 1
var img
function preload() {
img = loadImage("DigiChart.png")
}
function setup() {
createCanvas(720, 480);
img.resize(400,320)
}
function draw() {
background(220);
if (question == 1) {
q1()
} else if (question == 2) {
q2()
} else if (question == 3) {
q3()
} else if (question == 4) {
q4()
} else if (question == 5) {
q5()
} else if (question == 6) {
q6()
} else if (question == 7) {
q7()
} else if (question == 8) {
q8()
} else if (question == 9) {
q9()
} else if (question == 10) {
q10()
} else {
textSize(30)
text("lateral: " + 100*lateral/20 + "%", 50, 415)
text("impressionist: " + 100*impressionist/20 + "%", 270, 415)
image(img, 60, 60)
if (lateral > 15 && impressionist >= 15) {
textSize(50)
text("New Type",10,45)
} else if (lateral >= 15 && impressionist >= 10) {
textSize(50)
text("Fascinator",10,45)
} else if (lateral >= 15 && impressionist >= 5) {
textSize(50)
text("Analyst",10,45)
} else if (lateral >= 15 && impressionist >= 0) {
textSize(50)
text("Human Computer",10,45)
} else if (lateral >= 10 && impressionist >= 15) {
textSize(50)
text("Aesthetician",10,45)
} else if (lateral >= 10 && impressionist >= 10) {
textSize(50)
text("Overseer",10,45)
} else if (lateral >= 10 && impressionist >= 5) {
textSize(50)
text("Quick-Witted",10,45)
} else if (lateral >= 10 && impressionist >= 0) {
textSize(50)
text("Technician",10,45)
} else if (lateral >= 5 && impressionist >= 15) {
textSize(50)
text("Impressionist",10,45)
} else if (lateral >= 5 && impressionist >= 10) {
textSize(50)
text("Externalist",10,45)
} else if (lateral >= 5 && impressionist >= 5) {
textSize(50)
text("Understanding",10,45)
} else if (lateral >= 5 && impressionist >= 0) {
textSize(50)
text("Contemplative",10,45)
} else if (lateral >= 0 && impressionist >= 15) {
textSize(50)
text("Pure Instinct",10,45)
} else if (lateral >= 0 && impressionist >= 10) {
textSize(50)
text("Clearsighted",10,45)
} else if (lateral >= 0 && impressionist >= 5) {
textSize(50)
text("Level-Headed",10,45)
} else if (lateral >= 0 && impressionist >= 0) {
textSize(50)
text("Bookkeeper",10,45)
}
}
}
function q1() {
textSize(30)
text("How often do you feel disconnected from reality?",10,35)
textSize(24)
rect(40,100, 180,100)
text("constantly", 50, 135)
rect(260,100, 180,100)
text("often", 270, 135)
rect(480,100, 180,100)
text("rarely", 490, 135)
rect(40, 240, 180,100)
text("never", 50, 275)
}
function q2() {
textSize(30)
text("When I speak with others, ",10,35)
text("I make sure my wording is as literal as possible",10, 80)
textSize(24)
rect(40,100, 180,100)
text("strongly agree", 50, 135)
rect(260,100, 180,100)
text("agree", 270, 135)
rect(480,100, 180,100)
text("disagree", 490, 135)
rect(40, 240, 180,100)
text("strongly disagree", 50, 275)
}
function q3() {
textSize(30)
text("I do one thing at a time",10,35)
textSize(24)
rect(40,100, 180,100)
text("strongly agree", 50, 135)
rect(260,100, 180,100)
text("agree", 270, 135)
rect(480,100, 180,100)
text("disagree", 490, 135)
rect(40, 240, 180,100)
text("strongly disagree", 50, 275)
}
function q4() {
textSize(30)
text("Words come naturally too me",10,35)
textSize(24)
rect(40,100, 180,100)
text("strongly agree", 50, 135)
rect(260,100, 180,100)
text("agree", 270, 135)
rect(480,100, 180,100)
text("disagree", 490, 135)
rect(40, 240, 180,100)
text("strongly disagree", 50, 275)
}
function q5() {
textSize(30)
text("I live in the moment",10,35)
textSize(24)
rect(40,100, 180,100)
text("strongly agree", 50, 135)
rect(260,100, 180,100)
text("agree", 270, 135)
rect(480,100, 180,100)
text("disagree", 490, 135)
rect(40, 240, 180,100)
text("strongly disagree", 50, 275)
}
function q6() {
textSize(30)
text("The grammar error on question four bothered me",10,35)
textSize(24)
rect(40,100, 180,100)
text("a lot", 50, 135)
rect(260,100, 180,100)
text("a little", 270, 135)
rect(480,100, 180,100)
text("not really", 490, 135)
rect(40, 240, 180,100)
text("not at all", 50, 275)
}
function q7() {
textSize(30)
text("I get distracted by my thoughts",10,35)
textSize(24)
rect(40,100, 180,100)
text("constantly", 50, 135)
rect(260,100, 180,100)
text("often", 270, 135)
rect(480,100, 180,100)
text("rarely", 490, 135)
rect(40, 240, 180,100)
text("never", 50, 275)
}
function q8() {
textSize(30)
text("I care more about aesthetics than plot",10,35)
textSize(24)
rect(40,100, 180,100)
text("strongly agree", 50, 135)
rect(260,100, 180,100)
text("agree", 270, 135)
rect(480,100, 180,100)
text("disagree", 490, 135)
rect(40, 240, 180,100)
text("strongly disagree", 50, 275)
}
function q9() {
textSize(30)
text("I spend hours immersed in thought",10,35)
textSize(24)
rect(40,100, 180,100)
text("daily", 50, 135)
rect(260,100, 180,100)
text("weekly", 270, 135)
rect(480,100, 180,100)
text("monthly", 490, 135)
rect(40, 240, 180,100)
text("never", 50, 275)
}
function q10() {
textSize(30)
text("What do you think about the quiz?",10,35)
textSize(24)
rect(40,100, 180,100)
text("too vague", 50, 135)
rect(260,100, 180,100)
text("it's okay", 270, 135)
}
function mouseClicked() {
if (mouseX > 40 && mouseX < 220 && mouseY > 100 && mouseY < 195) {
if (question == 1) {
lateral += 2
question += 1
} else if (question == 2) {
impressionist += -2
question += 1
} else if (question == 3) {
lateral += -2
question += 1
} else if (question == 4) {
impressionist += -2
question += 1
} else if (question == 5) {
lateral += -2
question += 1
} else if (question == 6) {
impressionist += -2
question += 1
} else if (question == 7) {
lateral += 2
question += 1
} else if (question == 8) {
impressionist += 2
question += 1
} else if (question == 9) {
lateral += 2
question += 1
} else if (question == 10) {
impressionist += -2
question += 1
}
}
if (mouseX > 260 && mouseX < 440 && mouseY > 100 && mouseY < 195) {
if (question == 1) {
lateral += 1
question += 1
} else if (question == 2) {
impressionist += -1
question += 1
} else if (question == 3) {
lateral += -1
question += 1
} else if (question == 4) {
impressionist += -1
question += 1
} else if (question == 5) {
lateral += -1
question += 1
} else if (question == 6) {
impressionist += -1
question += 1
} else if (question == 7) {
lateral += 1
question += 1
} else if (question == 8) {
impressionist += 1
question += 1
} else if (question == 9) {
lateral += 1
question += 1
} else if (question == 10) {
impressionist += 2
question += 1
}
}
if (mouseX > 480 && mouseX < 660 && mouseY > 100 && mouseY < 195) {
if (question == 1) {
lateral += -1
question += 1
} else if (question == 2) {
impressionist += 1
question += 1
} else if (question == 3) {
lateral += 1
question += 1
} else if (question == 4) {
impressionist += 1
question += 1
} else if (question == 5) {
lateral += 1
question += 1
} else if (question == 6) {
impressionist += 1
question += 1
} else if (question == 7) {
lateral += -1
question += 1
} else if (question == 8) {
impressionist += -1
question += 1
} else if (question == 9) {
lateral += -1
question += 1
}
}
if (mouseX > 40 && mouseX < 220 && mouseY > 240 && mouseY < 335) {
if (question == 1) {
lateral += -2
question += 1
} else if (question == 2) {
impressionist += 2
question += 1
} else if (question == 3) {
lateral += 2
question += 1
} else if (question == 4) {
impressionist += 2
question += 1
} else if (question == 5) {
lateral += 2
question += 1
} else if (question == 6) {
impressionist += 2
question += 1
} else if (question == 7) {
lateral += -2
question += 1
} else if (question == 8) {
impressionist += -2
question += 1
} else if (question == 9) {
lateral += -2
question += 1
}
}
if (mouseX > 260 && mouseX < 440 && mouseY > 240 && mouseY < 335) {
}
if (mouseX > 480 && mouseX < 660 && mouseY > 240 && mouseY < 335) {
}
}