# How to make a TreasureHunter from NumberWizard

Hello Everyone!

Back when i was a University student, i had to make a Treasure Hunter game for one of my exams. I have to admit, i failed miserably, but that is not the point here.

The point: if you are looking for a simple, but exciting challenge, you can make this game on your own.

NumberWizard is a guessing game that uses a halving algorithm between a min and a max number. In order to go a step further lets imagine these values as one axis of a coordinate system. Lets call them Xmin and Xmax. Pair it with Ymin and Ymax. Of course with this, you will need to guess the X and Y axis separately, so lets just make an Xguess and Yguess.

If you follow the course, and make:

Xmax = Ymax = 100;
Xmin = Ymin = 1;
Xguess = Yguess = 50;

After this you just need to make the movements. In my code i used the numpad for directions and 5 as “enter”.

Last but not least, quick challenge, where should you add 1 to the max values to make the game run correct?