As Goch explained in his original project, "It's an old drawing game. You have to draw the house in one line, that means that you must not lift your pencil while drawing. It is also forbidden to repeat a line." Click on a line segment to draw it. After choosing the initial line, only the ones you can select next should be highlighted when you mouse over them.
Actually there's a design flaw in this code - you should really be constrained to only add on to the far end of the line you just drew, but I foolishly made my data structure out of line segments rather than vertices or directed line segments. And I'm too lazy to rewrite it at this point, but if someone wants to take this idea and do it properly, please do! A project like this would be an excellent first introduction to graph algorithms and data structures...