Random Letters
This program is a computerized version of a tool Heidi uses to help teach kids to read. It displays three letters, a vowel surrounded by two consonants. Click a letter to change it, or click outside the letter boxes to change all three.
Built with Processing
CodenPFont font;
String word="";
char vowels[] = {'A','E','I','O','U'};
char[] conc = new char[21];
String[] banned={"BAN","WRD","LST"};
int rwidth=100;
int rheight = 120;
int lborder=50;
int tborder=85;
boolean not_vowel(char c) {
boolean vowel=true;
for (int i=0;i<5;i++) {
if (c == vowels[i]) {
vowel=false;
break;
}
}
return vowel;
}
boolean is_banned(String s) {
boolean banword=false;
for (int i=0;i x) && (mouseX < x + rwidth)
&& (mouseY > y) && (mouseY < y + rheight)) {
clicked=i;
break;
}
x += (rwidth);
}
if (clicked == -1) {
change_letters();
} else {
change_letter(clicked);
}
loop();
}