IT WORKS!!!!!!!!!

Random tetrominoes - check
Rotation - check
Clearing of the line - check