awacke1 commited on
Commit
76a49c4
·
1 Parent(s): 68c2962

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -0
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)