I have a function that returns all the adyacent positions of a 2D array, something like this:
public static int[][] adyacents(int rows, int columns, int offsetRow, int offsetCol) {...}
The main array and one example of the adyacent array are the following ones to put an example:
char[][] example = {
{'A', 'B', 'C'},
{'D', 'E', 'F'},
{'G', 'H', 'I'}};
int[][] AdyacentsOfA = {
{0, 1},
{1, 0},
{1, 1}};
The only thing I need is to make a loop to access the content of all the different adyacent positions of each position of the main array.