2024(6): reference self instead of m
This commit is contained in:
@ -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] = "."
|
||||
|
||||
Reference in New Issue
Block a user