I assume you're referring to the slithering effect, right? The head constantly tweens between its current angle and the target angle each tick. The target angle is the angle towards the mouse + sin(time)*n
When moving, the snake accelerates in the direction the head is pointing.