You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"Answer the element at the given coordinates. If the coordinates are outside the grid bounds, they wrap around using 1-based indexing logic to ensure seamless boundary traversal."
CTArray2D>>atColumnWrap: col atRowWrap: row put: aValue [
208
-
209
+
"Store the given value at the specified coordinates. If the coordinates are outside the grid bounds, they wrap around using 1-based indexing logic (e.g., in a grid of width 3, column 4 wraps to 1, and column 0 wraps to 3)."
"Answer a collection of up to 8 valid elements surrounding the given origin. This method does not wrap; neighbors that would fall outside the grid are ignored. Throws an error if the starting origin coordinates are out of bounds."
381
+
379
382
| neighbors |
380
383
381
384
(col between:1and: self width) ifFalse: [ selferror:'Column out of bounds' ].
CTArray2D>>neighborsAtColumnWrap: col atRowWrap: row [
398
-
401
+
"Answer a collection of exactly 8 elements surrounding the given origin, wrapping across grid boundaries where necessary. Throws an error if the starting origin coordinates are out of bounds."
402
+
399
403
| neighbors |
400
404
401
405
(col between:1and: self width) ifFalse: [ selferror:'Column out of bounds' ].
0 commit comments