2024(6): reference self instead of m

This commit is contained in:
2024-12-25 15:29:16 +01:00
parent bc094b504f
commit d515a7b0c0

View File

@ -72,7 +72,7 @@ class Map:
guard_locations = []
for direction in self.directions:
guard_locations.extend(list(zip(*np.where(m.map == direction))))
guard_locations.extend(list(zip(*np.where(self.map == direction))))
return guard_locations
def load_map(self, filename="input"):
@ -96,7 +96,7 @@ class Map:
self.pos = guards[0]
self.trace.append(self.pos)
self.direction = m.map[self.pos]
self.direction = self.map[self.pos]
# TODO: Use enum.
#self.map[self.pos] = self.Tiles.FREE
self.map[self.pos] = "."