Skip to content

Commit 541b004

Browse files
committed
GoL_fast: Add minimal Solara visualisation
Add minimal Solara visualisation, to control model parameters.
1 parent 2ece0cf commit 541b004

File tree

1 file changed

+29
-0
lines changed
  • examples/conways_game_of_life_fast

1 file changed

+29
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
from mesa.visualization import SolaraViz
2+
from model import GameOfLifeModel
3+
4+
model_params = {
5+
"width": {
6+
"type": "SliderInt",
7+
"value": 10,
8+
"label": "Width",
9+
"min": 5,
10+
"max": 25,
11+
"step": 1,
12+
},
13+
"height": {
14+
"type": "SliderInt",
15+
"value": 10,
16+
"label": "Height",
17+
"min": 5,
18+
"max": 25,
19+
"step": 1,
20+
},
21+
}
22+
23+
page = SolaraViz(
24+
GameOfLifeModel,
25+
model_params,
26+
space_drawer=None,
27+
name="Game of Life Model",
28+
)
29+
page # noqa

0 commit comments

Comments
 (0)