Liquid Posted October 19, 2010 Share Posted October 19, 2010 I have to build a private hangman game. Im trying to break it up into parts and the one im stuck on is taking the letter, that the second user entered as his guess and comparing it to the first users secret word string. what i have right now is all jumbled so wont make much sense.Basicly how would you go about looking in a string for a character and then if its found implement a string the draws the letter in. Link to comment Share on other sites More sharing options...
Liquid Posted October 19, 2010 Author Share Posted October 19, 2010 System.out.println(secret.indexOf(guess));can you take the indexOf of a string with a string.in this case secret is a sting entered by the user and guess is a letter entered by a second user. i want to compare the letter to the word entered and then either print the next stage of the hangman or print the location of the letter in the word Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.