@@ -0,0 +1,1508 @@
+public class Game%0A%7B%0A%09public static final int MAX_MISSES = 7;%0A%09private String answer;%0A%09private String hits;%0A%09private String misses;%0A%0A%09public Game(String answer)%0A%09%7B%0A%09%09this.answer = answer.toLowerCase();%0A%09%09hits = %22%22;%0A%09%09misses = %22%22;%0A%09%7D%0A%0A%09public String getAnswer()%0A%09%7B%0A%09%09return answer;%0A%09%7D%0A%0A%09public char normalizeGuess(char letter)%0A%09%7B%0A%09%09if (!Character.isLetter(letter)) %7B%0A%09%09%09throw new IllegalArgumentException(%22A letter is required%22);%0A%09%09%7D%0A%09%09letter = Character.toLowerCase(letter);%0A%09%09if (hits.indexOf(letter) != -1 %7C%7C misses.indexOf(letter) != -1) %7B%0A%09%09%09throw new IllegalArgumentException(%22The letter '%22 + letter + %22' has already been guessed%22);%0A%09%09%7D %0A%09%09return letter;%0A%09%7D%0A%0A%09public boolean applyGuess(String letters)%0A%09%7B%0A%09%09if (letters.length() == 0) %7B%0A%09%09%09throw new IllegalArgumentException(%22Please enter '1' character.%22);%0A%09%09%7D%0A%09%09return applyGuess(letters.charAt(0));%0A%09%7D%0A%0A%09public boolean applyGuess(char letter)%0A%09%7B%0A%09%09letter = normalizeGuess(letter);%0A%0A%09%09boolean isHit = answer.indexOf(letter) != -1;%0A%0A%09%09if (isHit)%0A%09%09%7B%0A%09%09%09hits += letter;%0A%09%09%7D else %0A%09%09  %7B%0A%09%09  %09misses += letter;%0A%09%09  %7D%0A%09%09return isHit;%0A%0A%0A%09%7D%0A%0A%09public int getRemainingTries()%0A%09%7B%0A%09%09return MAX_MISSES - misses.length();%0A%09%7D%0A%0A%09public String getCurrentProgress()%0A%09%7B%0A%09%09String progress = %22%22;%0A%09%09for (char letter : answer.toCharArray()) %7B%0A%09%09%09char display = '-';%0A%09%09%09if (hits.indexOf(letter) != -1) %7B%0A%09%09%09%09display = letter;%0A%09%09%09%7D%0A%09%09%09progress += display;%0A%09%09%7D%0A%09%09return progress;%0A%09%7D%0A%0A%09public boolean isWon()%0A%09%7B%0A%09%09return getCurrentProgress().indexOf('-') == -1;%0A%09%7D%0A%0A%7D%0A%0A%0A%0A%0A%0A%0A%0A%0A%0A%0A%0A%0A

Create Game.java