Add code to the rotation of the block

I'm still contain bugs.