# ---------------------------------------------------------------------------
# Slovníková mapa bludiska: (x, y) -> {"color": ..., "victim": ..., "direction": ...}
# Farby: "blue", "black", "white"
# Smer: "north", "east", "south", "west" (podľa gyra)
# ---------------------------------------------------------------------------

maze_map = {}

def update_tile(x, y, color=None, victim=None, direction=None):
	"""
	Aktualizuje informácie o políčku v bludisku.
	Parametre:
	- x, y: súradnice políčka
	- color: farba podkladu ("blue", "black", "white")
	- victim: typ obete (string alebo None)
	- direction: smer pohľadu robota ("north", "east", "south", "west")
	"""
	if (x, y) not in maze_map:
		maze_map[(x, y)] = {"color": None, "victim": None, "direction": None}
	if color is not None:
		maze_map[(x, y)]["color"] = color
	if victim is not None:
		maze_map[(x, y)]["victim"] = victim
	if direction is not None:
		maze_map[(x, y)]["direction"] = direction

def get_tile(x, y):
	"""
	Vráti informácie o políčku na súradniciach (x, y).
	"""
	return maze_map.get((x, y), None)

def get_maze_map():
	"""
	Vráti celú mapu bludiska ako slovník.
	"""
	return maze_map
