/** * Create a new Row object that contains a guess that matches all guesses and the * responses to them that are on the table. * * @return the new Row to be added to the table along with the feedback afterwards. */ public Guess guess() { Guess guess = nextGuess(); while (guess != Guess.none && guessDoesNotMatch(guess)) { guess = nextGuess(); } return guess; }
/** * Create a new Row object that contains a guess that matches all guesses and the * responses to them that are on the table. * * @return the new Row to be added to the table along with the feedback afterwards. */ public Row guess() { Color[] guess = nextGuess(); while (guess != none && guessDoesNotMatch(guess)) { guess = nextGuess(); } if (guess == none) { return Row.none; } else { return new Row(guess); } }