<commit_before>import random

#
# Pathfinding class, avoids other objects
#
class Path(object):
	# Create a new Path
	def __init__(self, world, actor, src, dest):
		self.path = []
		self.actor = actor
		self.world = world
		self.maxG = self.world.grid_density - 1
		self.setSource(src)
		self.setDestination(dest)
		self.exclusions = {}
		self.last = None

	# Set the starting location of the path
	def setSource(self, cell):
		self.source = cell

	# Set the finishing location of the path
	def setDestination(self, cell):
		self.destination = cell

	# Returns the next node on the path
	def next(self):
		self.exclusions = {}
		return self.getBest(self.source)

	# Returns the entire path
	def path(self):
		return self.getPath(self.source)

	# Find a full path from the supplied cell
	def getPath(self, src):
		path = []
		self.exclusions = {}
		last = src
		while last and last[0] != self.destination[0] or last[1] != self.destination[1]:
			new = self.getBest(last)
			if new == last or not new:<commit_msg>Fix pathfinding<commit_after>import random

#
# Pathfinding class, avoids other objects
#
class Path(object):
	# Create a new Path
	def __init__(self, world, actor, src, dest):
		self.path = []
		self.actor = actor
		self.world = world
		self.maxG = self.world.grid_density - 1
		self.setSource(src)
		self.setDestination(dest)
		self.exclusions = {}
		self.last = None

	# Set the starting location of the path
	def setSource(self, cell):
		self.source = cell

	# Set the finishing location of the path
	def setDestination(self, cell):
		self.destination = cell

	# Returns the next node on the path
	def next(self):
		return self.getBest(self.source)

	# Returns the entire path
	def path(self):
		return self.getPath(self.source)

	# Find a full path from the supplied cell
	def getPath(self, src):
		path = []
		self.exclusions = {}
		last = src
		while last and last[0] != self.destination[0] or last[1] != self.destination[1]:
			new = self.getBest(last)
			if new == last or not new:
{'fraction_non_alphanumeric': 0.10994502748625687, 'fraction_numerical': 0.004997501249375313, 'mean_word_length': 3.655813953488372, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '731238', 'n_tokens_mistral': 714, 'n_tokens_neox': 654, 'n_words': 213}