Prevent polyominoes from being moved offscreen.
Cleaned up clear_lines function a bit.