snake movement and collision with ball