I'm very new to java and am trying to use if statements do decide which variables are in my array.
if (count<2){
int blockA = arrayOne[x-1][y];
int blockB = arrayOne[x-1][y];
int blockC = arrayOne[x][y-1];
int blockD = arrayOne[x][y+1];
int[] checker = {blockA,blockB,blockC,
blockD};
checkCount = 4;
}
else {
int blockE = arrayOne[x+1][y];
int blockF = arrayOne[x-1][y];
int blockG = arrayOne[x][y+1];
int[] checker = {blockE,blockF,blockG};
checkCount = 3;
}
but every time I compile it comes up saying "cannot find symbol" and is talking about when I use the checker array later on, arrayOne contains only numbers. Is there a way to make this work without using a funciton? Cheers