Add orientation to adjacency criteria.

So now it's distance, direction, color and position relative to the orientation of an
existing chain line, if one exists.