<commit_before>class Tile:
	_id = -1
	def __init__(self,x,y,landscape):
		self.pos_x = x
		self.pos_y = y
		self.landscape = landscape
		self._image_path = self.get_image_path()

	# returns the tiles sprite path in /img folder
	def get_image_path(self):
		# grass
		if (self.landscape == "G"):
			return "tile_grass.png"
		# dirt
		elif (self.landscape == "D"):
			return "tile_dirt.png"
		# water
		elif (self.landscape == "W"):
			return "tile_water.png"
		# mointains
		elif (self.landscape == "M"):
			return "tile_mountains.png"
		# forest
		elif (self.landscape == "F"):
			return "tile_forest.png"
		else:
			return None

	def get_position(self):
		return (self.pos_x, self.pos_y)

	def __repr__(self):
		return "<Tile lds=" + self.landscape + " pos=" + str(self.get_position()) + ">"<commit_msg>tile.py: much better handling of Tile name and image path with dicts<commit_after>class Tile:
	_id = -1

	image_paths = {
		"G": "tile_grass.png",
		"D": "tile_dirt.png",
		"W": "tile_water.png",
		"M": "tile_mountains.png",
		"F": "tile_forest.png"
	}

	names = {
		"G": "Green Grasslands",
		"D": "Dirty Landscapes",
		"W": "The Sea",
		"M": "High Mountains",
		"F": "A Dark Forest"
	}

	def __init__(self,x,y,landscape):
		self.pos_x = x
		self.pos_y = y
		self.landscape = landscape
		self.name = self.get_name()
		self._image_path = self.get_image_path()

	# returns the tiles sprite path in /img folder
	def get_image_path(self):
		return self.image_paths.get(self.landscape, None)

	def get_name(self):
		return self.names.get(self.landscape, None)

	def get_position(self):
		return (self.pos_x, self.pos_y)

	def __repr__(self):
		return "<Tile lds=" + self.landscape + " pos=" + str(self.get_position()) + ">"
{'fraction_non_alphanumeric': 0.156794425087108, 'fraction_numerical': 0.0011614401858304297, 'mean_word_length': 3.799442896935933, 'pattern_counts': {'":': 10, '<': 5, '<?xml version=': 0, '>': 5, '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': '1266251', 'n_tokens_mistral': 733, 'n_tokens_neox': 672, 'n_words': 156}