Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b40501f

Browse files
committed
Fix AlternatingNeighborProvider not alternating
1 parent 9610a1a commit b40501f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

ImageGeneration/Neighbors/Providers/AlternatingNeighborProvider.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,11 @@ public AlternatingNeighborProvider(Point[] inital, Point[] alternate) {
1616
@Override
1717
public Point[] getNeighbors() {
1818
if (inital) {
19+
inital = !inital;
1920
return initialNeighbors;
2021
}
2122
else {
23+
inital = !inital;
2224
return alternateNeighbors;
2325
}
2426
}

0 commit comments

Comments
 (0)