2 dimensional arrays

I am making a primitive terrain manager program using a 2 dimensional array. Im stuck on these parts of the program. Any help would be appreciated Thank you!

minimum() returns the lowest elevation in the plot of land
maximum() returns the highest elevation in the plot of land
steepest() returns the largest difference in elevation for adjacent square meters, including diagonals

Heres what a sample plot would look like (where elevations would be bigger than 0.0). The G stands for grass and i ideally there would be T's and B's for bushes and trees. But i don't want to worry about that right now.

Joes Plot
0.0,G,0.0,G,0.0,G,0.0,G,0.0,G,0.0,G,0.0,G,0.0,G,0.0,G,0.0,G,
0.0,G,0.0,G,0.0,G,0.0,G,0.0,G,0.0,G,0.0,G,0.0,G,0.0,G,0.0,G,
0.0,G,0.0,G,0.0,G,0.0,G,0.0,G,0.0,G,0.0,G,0.0,G,0.0,G,0.0,G,
0.0,G,0.0,G,0.0,G,0.0,G,0.0,G,0.0,G,0.0,G,0.0,G,0.0,G,0.0,G,
0.0,G,0.0,G,0.0,G,0.0,G,0.0,G,0.0,G,0.0,G,0.0,G,0.0,G,0.0,G,
0.0,G,0.0,G,0.0,G,0.0,G,0.0,G,0.0,G,0.0,G,0.0,G,0.0,G,0.0,G,
0.0,G,0.0,G,0.0,G,0.0,G,0.0,G,0.0,G,0.0,G,0.0,G,0.0,G,0.0,G,
0.0,G,0.0,G,0.0,G,0.0,G,0.0,G,0.0,G,0.0,G,0.0,G,0.0,G,0.0,G,
0.0,G,0.0,G,0.0,G,0.0,G,0.0,G,0.0,G,0.0,G,0.0,G,0.0,G,0.0,G,
0.0,G,0.0,G,0.0,G,0.0,G,0.0,G,0.0,G,0.0,G,0.0,G,0.0,G,0.0,G,
Sounds like you need to write a class that will handle your plot of land. So I suggest that you start with that...
Topic archived. No new replies allowed.