diff --git a/DLASystem.cpp b/DLASystem.cpp index 4549677..6458b5c 100644 --- a/DLASystem.cpp +++ b/DLASystem.cpp @@ -116,28 +116,31 @@ const static size_t NEIGHBOURS = 26; // this has to be done separately... void DLASystem::setPosNeighbour(double setpos[], double pos[], int val) { const static double offsets[NEIGHBOURS][3] = { + // These 6 are first to represent the 6 immediate neighbours of the cell when checking sticking + {1, 0, 0}, + {-1, 0, 0}, + {0, 1, 0}, + {0, -1, 0}, + {0, 0, 1}, + {0, 0, -1}, + + // The off-axis neighbours {-1, -1, -1}, {-1, -1, 0}, {-1, -1, 1}, {-1, 0, -1}, - {-1, 0, 0}, {-1, 0, 1}, {-1, 1, -1}, {-1, 1, 0}, {-1, 1, 1}, {0, -1, -1}, - {0, -1, 0}, {0, -1, 1}, - {0, 0, -1}, - {0, 0, 1}, {0, 1, -1}, - {0, 1, 0}, {0, 1, 1}, {1, -1, -1}, {1, -1, 0}, {1, -1, 1}, {1, 0, -1}, - {1, 0, 0}, {1, 0, 1}, {1, 1, -1}, {1, 1, 0},