forked from projectmesa/mesa
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
examples: Convert hex_snowflake to simple namespace
- Loading branch information
Showing
3 changed files
with
9 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,13 @@ | ||
from mesa.visualization.modules import CanvasHexGrid | ||
from mesa.visualization.ModularVisualization import ModularServer | ||
import mesa | ||
|
||
from hex_snowflake.portrayal import portrayCell | ||
from hex_snowflake.model import HexSnowflake | ||
|
||
width, height = 50, 50 | ||
|
||
# Make a world that is 50x50, on a 500x500 display. | ||
canvas_element = CanvasHexGrid(portrayCell, width, height, 500, 500) | ||
canvas_element = mesa.visualization.CanvasHexGrid(portrayCell, width, height, 500, 500) | ||
|
||
server = ModularServer( | ||
server = mesa.visualization.ModularServer( | ||
HexSnowflake, [canvas_element], "Hex Snowflake", {"height": height, "width": width} | ||
) |