class Wall: character = '─' color = 'blue' passable = False @classmethod def horzline(cls, origin, length): agents = [] x, y = origin for dx in range(length): wall = cls((x + dx, y)) agents.append(wall) return agents def __init__(self, position): self.position = position