awacke1 commited on
Commit
d4ea9dc
โ€ข
1 Parent(s): 6f86ef3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -1
app.py CHANGED
@@ -189,6 +189,14 @@ def generate_encounter_conclusion(situation, action, outcome):
189
  else:
190
  return random.choice(FAILURE_CONCLUSIONS)
191
 
 
 
 
 
 
 
 
 
192
  # The rest of the code remains mostly the same
193
  # ๐ŸŽฎ Main Game Application
194
  def main():
@@ -221,7 +229,7 @@ def main():
221
  'history_df': pd.DataFrame(columns=['user_id', 'timestamp', 'situation_id', 'situation_name', 'situation_emoji', 'situation_type', 'action_id', 'action_name', 'action_emoji', 'action_type', 'outcome', 'conclusion', 'gear_strength', 'rider_skill', 'score'])
222
  }
223
 
224
- # Main gameplay loop and event handling (same as before)
225
  situation = generate_situation()
226
  actions = generate_actions()
227
 
 
189
  else:
190
  return random.choice(FAILURE_CONCLUSIONS)
191
 
192
+ # Function to generate a random situation
193
+ def generate_situation():
194
+ return random.choice(SITUATIONS)
195
+
196
+ # Function to generate random actions
197
+ def generate_actions():
198
+ return random.sample(ACTIONS, min(3, len(ACTIONS)))
199
+
200
  # The rest of the code remains mostly the same
201
  # ๐ŸŽฎ Main Game Application
202
  def main():
 
229
  'history_df': pd.DataFrame(columns=['user_id', 'timestamp', 'situation_id', 'situation_name', 'situation_emoji', 'situation_type', 'action_id', 'action_name', 'action_emoji', 'action_type', 'outcome', 'conclusion', 'gear_strength', 'rider_skill', 'score'])
230
  }
231
 
232
+ # Main gameplay loop and event handling
233
  situation = generate_situation()
234
  actions = generate_actions()
235