Rotate and Flip the grid