import java.util.Scanner; public class WordelGame { public static void main(String[] args) { Wordel word = new Wordel(); Scanner kb = new Scanner(System.in); System.out.println(" Diagnostic: " + word); System.out.println(" Simple Wordle: You have 6 guesses to guess a 5 lettered word"); int guessNumber = 1; System.out.print("Guess " + guessNumber + ": "); String guess = kb.nextLine().toUpperCase(); while ( !word.equals(guess) && guessNumber < 6 ) { guessNumber++; if ( guess.length() != 5) System.out.println("That wasn't even 5 letters! "); else { String clue = word.getClue(guess); System.out.println(guess); System.out.println(clue); } System.out.print("Guess " + guessNumber + " Type a 5 letter word: "); guess = kb.nextLine().toUpperCase(); } if (word.equals(guess)) { System.out.println ("Congratulations!! You got it in " + guessNumber + " tries"); } else System.out.println ("All your guesses are used. The word was " + word); } }