All pastes #482320 Raw Edit

MrArmadillo

public python v1 · immutable
·published 2007-05-11 06:30 UTC
rendered paste body
	n = -1def track(coord):	" track to the coord "	def followpath(path):	while 1:		track(path[n].coord)		if dist(own, path[n].coord) < 3: #if close to the coord			if path[n] == g.endnode:				print "reached destination"				break #done			else:				n = n-1 #go to the next node		else:			continue			followpath(f.path)