So far, it's all working great, but all I need left is to get the method WORD1() to go to WORD2() when the person types in the correct letters. The first word is "Java". How would I make it so that when they type in "Java", it will go to WORD2()?
public static void main(String[] args) {
STAND();
WORD1();
WORD2();
}
public static void WORD1() { //Java
char[] JAVA = {'j','a','v'};
char key = ' ';
String done;
c.setFont(new Font("arial", Font.PLAIN, 50));
c.setColor(Color.BLACK);
c.drawString("_", 251, 472);
c.drawString("_", 287, 472);
c.drawString("_", 322, 472);
c.drawString("_", 357, 472);
while(key != 'J' || key != 'A' || key != 'V' || key != 'j' || key != 'a' || key != 'v')
{
key = c.getChar();
if (key == 'J' || key == 'j')
{
c.setFont(new Font("arial", Font.BOLD, 50));
c.setColor(Color.BLACK);
c.drawString("J", 250, 470);
}
else if (key == 'A' || key == 'a')
{
c.setFont(new Font("arial", Font.BOLD, 50));
c.setColor(Color.BLACK);
c.drawString("A", 285, 470);
c.drawString("A", 355, 470);
}
else if (key == 'V' || key == 'v')
{
c.setFont(new Font("arial", Font.BOLD, 50));
c.setColor(Color.BLACK);
c.drawString("V", 320, 470);
}
else if(JAVA[0] == 'j' && JAVA[1] == 'a' && JAVA[2] == 'v')
{
c.clear();
counter = 0;
STAND();
WORD2();
}
else if(key != 'J' || key != 'A' || key != 'V' || key != 'j' || key != 'a' || key != 'v')
{
COUNTER();
if(counter == 11)
{
c.clear();
c.setFont(new Font("arial", Font.PLAIN, 25));
c.setColor(Color.BLACK);
c.drawString("You him! Try the next word!", 125, 250);
c.setColor(Color.RED);
c.drawString("killed", 174, 250);
c.setFont(new Font("arial", Font.PLAIN, 15));
c.setColor(Color.BLACK);
c.drawString("The next word will automatically start in 5 seconds.", 150, 275);
WAIT();
c.clear();
counter = 0;
STAND();
WORD2();
}
}
}
}
public static void WORD2() {
//code here
}