Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def __init__(self, model):
'''
Create a new visualization for a WalkerWorld instance.
args:
model: An instance of a WalkerWorld model.
'''
self.model = model
grid_viz = TextGrid(self.model.grid, None)
grid_viz.converter = lambda x: str(len(x))
self.elements = [grid_viz]
def __init__(self, model):
'''
Create new Schelling ASCII visualization.
'''
self.model = model
grid_viz = TextGrid(self.model.grid, self.ascii_agent)
happy_viz = TextData(self.model, 'happy')
self.elements = [grid_viz, happy_viz]
def __init__(self, model):
'''
Create new Schelling ASCII visualization.
'''
self.model = model
grid_viz = TextGrid(self.model.grid, self.print_ascii_agent)
happy_viz = TextData(self.model, 'happy')
self.elements = [grid_viz, happy_viz]
def __init__(self, model):
'''
Create new Schelling ASCII visualization.
'''
self.model = model
grid_viz = TextGrid(self.model.grid, self.ascii_agent)
happy_viz = TextData(self.model, 'happy')
self.elements = [grid_viz, happy_viz]
def __init__(self, model):
self.model = model
grid_viz = TextGrid(self.model.grid, self.draw_cell)
self.elements = [grid_viz]