drawing out a path

u got only 10 seconds to manage 5 units, so i made a fast draw path system wich u can draw random stuff and it suppose to figure out what u meant to do, red marks the beginning and end of the pathways

Screen Shot 2013-08-24 at 22.02.21