A request for the ability to specify an array as wrapped, so that shifting 2d arrays one left / right / up / down becomes
possible.
example of a shift to the left:
[1,2,3]
[4,5,6]
[7,8,9]
to
[2,3,1]
[5,6,4]
[7,8,9]
You demonstrate shifting in your game of life example, but as arrays aren't wrapped, you lose columns / rows.
another example:
array = [1,2,3,4,5,6,7]
array[7]
> 1
array[10]
> 4
array = [
[1,2,3]
[4,5,6]
[7,8,9]
}
In this wrapped array, looking to the right of "6" gives you "4"
array[2,1]
> 6
array[3,1]
>4
|