//this is a small test to see what type of lover are you and how you treat your love relationship
//main question with 4 choices
PFont font;
String question = "choose your future job----------------a. artist b. photographer c. sculptor d. writer";
String letters = "";
int back = 0;
int mode = 0;
void setup() {
size(400, 400);
font = loadFont("BankGothic-Light-20.vlw");
textFont(font);
textAlign(LEFT);
}
void draw() {
background(back);
text(question, 30, 30, 150, 250);
text(letters, 300, 350);
text("press a, b, c, or d _______", 80, 350);
}
void keyPressed() {
if ((key == ENTER) || (key == RETURN)) {
letters = letters.toLowerCase();
println(letters);
//what happens after pressing letter 'a'
if (letters.equals("a")) {
back = 50;
stroke(0);
fill(255);
textSize(22);
question = "you are self-centered, selfish, and it is impossible for your lover to change your personality because everthing you say is correct.";
mode = 1;
}
//what happens after pressing letter 'b'
else if (letters.equals("b")) {
back = 100;
question = "you care about the connection between you and your lover by showing respect. you always know what your lover needs";
mode = 2;
}
//what happens after pressing letter 'c'
else if (letters.equals("c")) {
back = 150;
question = "you are always serious about love relationship, you are always the aggresive one, the one who shapes the relationship. ";
mode = 3;
}
//what happens after pressing letter 'd'
else if (letters.equals("d")) {
back = 200;
question = "you are not superficial. money does not affect the way you act in a love relationship. you are accepting and kind";
mode = 4;
}
letters= "";
}
else if ((key > 31) && (key != CODED)) {
letters = letters + key;
}
}
Justin - G
on Thursday, Oct 16, 2008 – 6:46 pm