I have a 1 dimensional list of values, it looks like this "int[] values'". I beleive I have converted it to a 2d list like this :
for (int i = 0; i < 4; i++) {
for (int j = 0; j < 4; j++) {
board[i][j] = values[i * 4 + j];
}
}
The board is the new 2 dimensional list of values. On the board there are numbers. A 0 means an empty space, a 1 is a green, a 2 is a blue, and a 3 is a red. How would I use depth first search to find a completed path of a certain color?