private Block Turn(Block block, int rotation) { if (block.Shape == Shape.O) { return(null); } var source = Offset(block); var target = Offset(block, rotation); var col = target.Column - source.Column; var flr = target.Floor - source.Floor; col += block.Column; flr += block.Offset; return(rows.Block(block.Shape, block.Rotation.Rotate(rotation), col, flr)); }