Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -63,6 +63,14 @@ def draw_habitat_and_wildlife(player, game_state):
|
|
63 |
game_state['players'][player]['wildlife'].append(wildlife)
|
64 |
save_game_state(game_state)
|
65 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
|
67 |
# Display players' areas and handle actions
|
68 |
col1, col2 = st.columns(2)
|
|
|
63 |
game_state['players'][player]['wildlife'].append(wildlife)
|
64 |
save_game_state(game_state)
|
65 |
|
66 |
+
game_state = load_game_state()
|
67 |
+
if game_state is None:
|
68 |
+
game_state = {
|
69 |
+
'habitat_stack': random.sample(habitat_tiles * 10, 50),
|
70 |
+
'wildlife_stack': random.sample(wildlife_tokens * 10, 50),
|
71 |
+
'players': {player: {'habitat': [], 'wildlife': [], 'nature_tokens': 3} for player in players}
|
72 |
+
}
|
73 |
+
|
74 |
|
75 |
# Display players' areas and handle actions
|
76 |
col1, col2 = st.columns(2)
|