This version uses sprites. You'll have to play around with the formulas that determine where it's going to move. Right now they produce variable distance between segments, which causes a kind of creepy movement - like a centipede in a box trying to get out.