Skip to content

Find treasure

derok

Asked Oct 21, 2009, 3:10 AM EDT1 answer
Share
LinkedInX
Hi, i'm trying to to a c sharp program in console that finds a treasure with the help of the user. for example, look at this pic: http://img40.imageshack.us/img40/368/cuadro2m.jpg the treasure is where the "T" is. the square in the pic is like 5x5. if we count from bottom left corner, the coordenates for the treasure will be: (2,3). the idea is that the program tells the user where to go, for example: north, south, noreast, and the user enters "north", "east",etc. depending where he has to go, until he finds the treasure. i dont want to draw the map in console, i just that the user is able to find the treasure. what can i do? thanks...

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • 0
    can i work with two 2-dimensional arrays of ints? for example: one for the direction of the treasure, and one for the input that the user is entering, something like this: int[,] TreasureArray = new int[5,5]; int[,] UserArray = new int[5,5]; and then comparing the one that the user is entering with the one from the treasure. can i do this?
    0