Treasure Hunt

Task 1

Write a program that places a single random number somewhere in a 2D array. The user is asked to guess the location.


  1. Tell them how far their guess is away from the treasure location.
  2. Tell them which direction (N,E,S,W) they need to travel in order to find the treasure location.
  3. Allow them to adjust the size of the grid on game start.
  4. Count the number of attempts it takes to get the right answer.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.