No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
Scanner input = new Scanner(System.in); String secretWord ; String guess, dash = "-", upWord; int numGuesses = 0; int numWord; final String SENTINEL = "!"; System.out.println("Player 2, please look away. Player 1, please enter the secter word: \n"); secretWord = input.next().toUpperCase().trim(); numWord = secretWord.length(); for(int dashNum = 1; dashNum < … |
|
Re:
I'm trying to create a word game in which a player must guess a secret word. Initially the secret word it showed as a series of underline characters corresponding to the length of the word to guess example: “pig” - - - When a letter entered by the player is … |