hi, i'm designing a game in vb.net

my consists on many hexagons, fit together, each haxagon has some lines on it, the point of the game is for you to make the hexagons lines to conect with other hexagon's lines, in order to create one continuous line that starts in an edge of the game, and ends in another.

i already have the hexagons, the lines inside, and am even able to detect where a line conects with another.

my problem is in followingfrom on edge, until the last line, wich has no conection with anything.

the hexagons are a class, and are arranged in a list. each hexagon has one or two lines, defined by the start and end points.

can any one help me designing this sub, wich detects continuous lines ?