OK, sorry everyone. After re-reading the thread, I can see how everyone is confused at what I want. I will explain it better:
Like a few others around here, I am attempting to create a maze of sorts using an array. However in my case each "block" of the maze/array is not solid, but open. Think of them as rooms that will each spawn walls according to their code in the array position.
But at this point all I need is to populate the array with numbers. Each number is a code for a set of walls that will spawn on the room block.
So, I will need to know where I am at specific positions in the array, to then be able to suggest the correct random code numbers that will spawn appropriate walls. The theory goes like this:
Start of Layout
->find where you are in Array
-->If at upper left corner set array.at(current x,y) One of these values (0,5,9)
-->If at top of Array set array.at(current x,y) One of these values (1,3,8,7,12)
-->If at right of array set array.at(current x,y) One of these values (2,...)
-->If at left of array set array.at(current x,y) One of these values (16,...)
--> if at bottom...
--> if in middle somewhere...
The sets of numbers correlate with the position. So with above codes, 0,5,9 are block walls leaving exits east and/or south, (from the top left corner of the map). (codes above are not actual. I am not looking at my code list...)
That is what I am trying to achieve. So now does my cap make more sense?
P.S> Thanks Yann and Rojohound for trying.