Skip to content

Commit

Permalink
GoL_fast: Add minimal Solara visualisation
Browse files Browse the repository at this point in the history
Add minimal Solara visualisation, to control model parameters.
  • Loading branch information
EwoutH committed Aug 29, 2024
1 parent 1a1bf67 commit 1a50528
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions examples/conways_game_of_life_fast/app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
from mesa.visualization import SolaraViz
from model import GameOfLifeModel

model_params = {
"width": {
"type": "SliderInt",
"value": 10,
"label": "Width",
"min": 5,
"max": 25,
"step": 1,
},
"height": {
"type": "SliderInt",
"value": 10,
"label": "Height",
"min": 5,
"max": 25,
"step": 1,
},
}

page = SolaraViz(
GameOfLifeModel,
model_params,
space_drawer=None,
name="Game of Life Model",
)
page # noqa

0 comments on commit 1a50528

Please sign in to comment.