Prevent changing direction by 180 degrees (unless snake length==1).