At this stage in my puzzle game I'm searching for a pattern in a bunch of pixels.... the issue here is with the loop.
I'm seeing unexpected results and i traced it the line commented //reset to zero , the loop continues without resetting to zero because the order should be as in the next code below the first, but this flags as error
So is there any way around this? (code in JAVA)
for(int j=1; j<=15; j++){
outOfRowColor=0; inRowColor=0; // reset to zero
loop1:
for(int i=1; i<=15; i++){
...
...
if( outOfRowColor >= 3 )continue loop1;
}
}
outOfRowColor=0; and inRowColor=0; need to reset at beginning of the next cycle of the loop, and should be in this order but this wouldn't compile. Looking for alternative means to get this done
Any ideas , thanks
for(int j=1; j<=15; j++){
loop1:
outOfRowColor=0; inRowColor=0; // reset to zero, Error because loop1 should be next to for(){
for(int i=1; i<=15; i++){
...
...
if( outOfRowColor >= 3 )continue loop1;
}
}