Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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
|
| 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 |
|