Skip to content

Commit

Permalink
Fixing some names and paths in examples
Browse files Browse the repository at this point in the history
  • Loading branch information
dmasad committed Jul 14, 2018
1 parent 10ee497 commit 8c31cd0
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@


class SimpleCanvas(VisualizationElement):
local_includes = ["flockers/simple_continuous_canvas.js"]
local_includes = ["boid_flockers/simple_continuous_canvas.js"]
portrayal_method = None
canvas_height = 500
canvas_width = 500
Expand Down
4 changes: 2 additions & 2 deletions examples/boid-flockers/boid_flockers/server.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from mesa.visualization.ModularVisualization import ModularServer

from .model import BoidServer
from .model import BoidFlockers
from .SimpleContinuousModule import SimpleCanvas


Expand All @@ -18,4 +18,4 @@ def boid_draw(agent):
"separation": 2
}

server = ModularServer(BoidServer, [boid_canvas], "Boids", model_params)
server = ModularServer(BoidFlockers, [boid_canvas], "Boids", model_params)
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,6 @@ def citizen_cop_portrayal(agent):
legitimacy=.8,
max_jail_term=1000)


canvas_element = CanvasGrid(citizen_cop_portrayal, 40, 40, 480, 480)
server = ModularServer(EpsteinCivilViolence, [canvas_element],
"Epstein Civil Violence", model_params)
2 changes: 1 addition & 1 deletion examples/shape_example/shape_example/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from mesa.visualization.modules import CanvasGrid
from mesa.visualization.ModularVisualization import ModularServer

from shape_model.model import Walker, ShapeExample
from .model import Walker, ShapeExample


def agent_draw(agent):
Expand Down
2 changes: 1 addition & 1 deletion examples/sugarscape_cg/sugarscape_cg/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def SsAgent_portrayal(agent):
portrayal = {}

if type(agent) is SsAgent:
portrayal["Shape"] = "sugarscape/resources/ant.png"
portrayal["Shape"] = "sugarscape_cg/resources/ant.png"
portrayal["scale"] = 0.9
portrayal["Layer"] = 1

Expand Down

0 comments on commit 8c31cd0

Please sign in to comment.