while (var<10)
{
String line=keyboard.nextLine();
input = line.charAt(0);
game.makeGuess(input);
game.getDisguisedWord();
game.isFound();
System.out.println(game.getDisguisedWord());
System.out.println(game);
System.out.println(game.getWrong());
int i=0;
i++;
if (var<i+game.getDisguisedWord().length()-1)
System.out.print("Guess #" + game.guessCount()+": ");
var=game.getWrong();
if (game.isFound())
var=10;
}
不知道出了什么问题,但是如果我打印出 i,它只会保持在 1。我需要这样做才能让某些东西停止打印:(