diff --git a/server.py b/server.py index b3673e3..814ec14 100644 --- a/server.py +++ b/server.py @@ -4,14 +4,11 @@ from mesa.visualization.ModularVisualization import ModularServer def player_representation(agent): - portrayal = {"Shape": "circle", - "Filled": "true", - "Layer": 0, - "Color": "red", - "r": 0.5} + portrayal = {"Shape": "sprites/hero.png", + "Layer": 1} if agent.isBox: - portrayal["Color"] = "grey" - portrayal["Layer"] = 1 + portrayal["Shape"] = "sprites/box.png" + portrayal["Layer"] = 0 return portrayal grid = CanvasGrid(player_representation, 10, 10, 500, 500) diff --git a/sprites/box.png b/sprites/box.png new file mode 100644 index 0000000..42785e9 Binary files /dev/null and b/sprites/box.png differ diff --git a/sprites/hero.png b/sprites/hero.png new file mode 100644 index 0000000..d085be9 Binary files /dev/null and b/sprites/hero.png differ