So I have 2d square array of any given size. I also have 4 numbers, which I place in the center of the array. For example 1234.
The way I figure out the center is basically X array size / 2 gives me the first top right center square then I use +/- to place it into position. (Also is there a better way?)
I need an optimal way to add all the numbers so the array is fully filled, the image demonstrates what I am currently thinking of doing.
Is there a more efficient way to accomplish this, as the array could be very large.
The way I figure out the center is basically X array size / 2 gives me the first top right center square then I use +/- to place it into position. (Also is there a better way?)
I need an optimal way to add all the numbers so the array is fully filled, the image demonstrates what I am currently thinking of doing.
Is there a more efficient way to accomplish this, as the array could be very large.
