Moving shapes with collision detection