//its a bit tough to get all the gangster lingo down so look at the code for some tips!!! : )
PFont font;
String letters = "";
String question = "whatre you packin'? ";
String answer = "les see wat chu got";
void setup() {
size(400, 400);
font = loadFont("Aharoni-Bold-48.vlw");
textFont(font);
textAlign(CENTER);
textSize(18);
background(50);
}
void draw() {
background(50);
textSize(30);
text(question, 70, 90, 250, 100);
textSize(45);
text(letters, 200, 230);
textSize(12);
}
void keyPressed() {
if (key == ENTER) {
letters = letters.toLowerCase();
// println(letters); // Print to console to see input
if (letters.equals("heat")) {
question = "yo dawg that be HOT, lets bust some caps! what else you got?";
} else if (letters.equals("drugs")) {
question = "ah! nice to see youre helping the economy!";
} else if (letters.equals("sandwiches")) {
question = "ooh homie hook a brotha up! mm-mmm pb and J!";
} else if (letters.equals("suitcases")) {
question = "homeboy those be some NIIICE suitcases! you goin to hawaii o somethin? what els eyou packin in there?";
} else if (letters.equals("a trouser snake")) {
question = "oh snap dawg i thought those were extinct! what else you got hidin?";
} else if (letters.equals("bling-bling")) {
question = "shwing! so fly, homesauce, so fly! anythin else?";
} else if (letters.equals("a lunch")) {
question = "mm-mm!! make me one g! what else you packing?";
} else if (letters.equals("sawdust")) {
question = "yeah gangstah! i do that too when im doing home improvements! what else?";
} else if (letters.equals("punches")) {
question = "left jab, right jab! youre a modern-day Mister T in Rocky! show me what else you got!";
} else if (letters.equals("guns")) {
question = "watch where you point that, homeboy! ";
}
else {
question = "yo you a cop? i said, what you packin?";
}
letters = "";
} else if ((key > 31) && (key != CODED)) {
letters = letters + key;
}
}Monica - G
on Wednesday, Oct 22, 2008 – 3:36 am