hangman game
807607Nov 6 2006 — edited Nov 6 2006i need help creating a hangman game with a predefined array of words for a java assignment here is my code so far
input Textfield 1 "for inputing word letters"
int alltrys = 6; "allow 6 incorrect"
int nowrong =0;
char guess;
int guessnumbers;
boolean badGuess;
String[] words;
public void init (){
word = newString(20); "this is going to be my array of predefined words"
{
word(0) = "cardiff";
word(1) = "bluebirds";
word(2) = "ccfc";
word(3) = "goal";
word(4) = "alexander";
word(5) = "jones";
word(6) = "hamman";
word(7) = "ridsdale";
word(8) = "ninianpark";
word(9) = "bluearmy";
word(10) = "grandstand";
word(11) = "cantonstand";
word(12) = "grangeend";
word(13) = "bobbank";
word(14) = "wales";
word(15) = "city";
word(16) = "penalty";
word(17) = "shoots";
word(18) = "chopra";
word(19) = "ayatollah";
int w = rand.nextInt(20);
int randomNumber I = Math.random()*word.length);
for (int stringIndex = 0; stringIndex < word(i),length();stringIndex ++)
char.currrentCharacter
}
dont know if some is even right but am reccomended to also use
drawString()
drawOval()
drawLine()
TextField()
Button()
i am only new to java so really need help also using textpad to do java