Why are we not calling NextGuess() inside of StartGame()?

We can clean up our code even more if we just call NextGuess() inside of the StartGame() instead of typing out

guess = (max + min) / 2;
guessText.text = guess.ToString();

Hi Dmitriy,

Welcome to our community! :slight_smile:

Whether you call NextGuess in StartGame is a design decision. From a human perspective, does it make sense to class NextGuess if there hasn’t been any initial guess yet? For the computer, our method names are completely meaningless but we also have to keep the people in mind who might read our code and try to understand it.


See also:

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms