Using NextGuess() in StartGame()

HI, and thanx for a very good course.
I just wondered why you did this:

void StartGame()
{
	max += 1;
	guess = (max + min) / 2;
}

and not this:

void StartGame()
{
	max += 1;
	NextGuess();
}

Thanks
Garrim

1 Like

Well, eventually you did. :slight_smile:

1 Like

You’ll find that a lot of the course content is progressive, so often a less than ideal way is demonstrated to get across the concept, and then refactored/improved later. Sometimes it isn’t, so there’s plenty of scope for you to make improvements also - and well done for spotting this by the way :slight_smile:

Privacy & Terms