Extracting elements from a 2D array in another class
posted 3 years ago
Not sure if anyone will be able to help me with this but I am completely stuck so I figured it is worth a shot...
I am writing a program for an assignment and one of the steps is to use the index variable (created under a method called NTS.mapLetterIndexOf) and the direction constants (WEST, EAST, NORTH and
SOUTH) (which I declared and created in a class called NTS) to extract an element from the 2D array into the Main class. My teacher provides this example for extracting: westMap = adjMapLetters[mapPosition][WEST]. Only I have tried that and it does not work. Here is most of the code:
... other code...
I need to figure out how I can extract the element from the array in the NTS class into the Main class. Any thoughts?
It is this part of the code that doesn't work.