Exercise tetris

My first solution computed the rotations mathematically, but since most shapes have different rotation points and some shapes don't make a full rotation (for example the S and Z shapes only rotate between the standard form and 90 degrees rotation, then goes back to the original).