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.

Extensions

  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.
About CDB 360 Articles
Self-Employed Software Developer, Spark, Property Management, Hobby Forestry, Ex-Teacher, Engineering - Wood, Metal, Electrics & Computers. Outdoors - Walk, Cycle, Kitesurf,

Be the first to comment

Leave a Reply

Your email address will not be published.


*


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