Try to click around and you will see that it generates 3x3 blocks or for example on g-7 2x2 witch is correct but if you try g-1 for example you see that something breaks!
I cant figure out the best method to solve this! Any help?
Thanks in advance!
The first question is what should it do if you click on G1? Should it block out F1, F2 and G2, or should it “wrap” and also block out F7, G7, A7, A1 and A2?
I suspect the issue is that you don’t do any bounds-checking when you are splitting the arrays. I just put max() and min() around some stuff in both areas: