I don't think you see what's the problem.
I can, and I have, made a version which uses a 4x4 array. Rotating the array by 90 degrees is easy. But the problem is not how the pieces are stored, but how they are rotated.
Take the long XXXX piece. When you rotate it, the pivot is usually on the second X. So when you rotate it, it goes around the second X. If you simply store it in an array and rotate it by 90 degrees, everything is rotated by 90 degrees, including the blank space. Not only is this not how Tetris is supposed to work, it also looks really odd as the piece jumps around an invisable box. Make a thick line in a blank square in paint, and try rotating it.
Or take the
XXX
..X
piece. Its pivot is the second block along the top. When you rotate it, that block always remains in the same place.
The problem is not about arrays, it's about how to rotate a shape around a pivot.
I can, and I have, made a version which uses a 4x4 array. Rotating the array by 90 degrees is easy. But the problem is not how the pieces are stored, but how they are rotated.
Take the long XXXX piece. When you rotate it, the pivot is usually on the second X. So when you rotate it, it goes around the second X. If you simply store it in an array and rotate it by 90 degrees, everything is rotated by 90 degrees, including the blank space. Not only is this not how Tetris is supposed to work, it also looks really odd as the piece jumps around an invisable box. Make a thick line in a blank square in paint, and try rotating it.
Or take the
XXX
..X
piece. Its pivot is the second block along the top. When you rotate it, that block always remains in the same place.
The problem is not about arrays, it's about how to rotate a shape around a pivot.