Update app.py
Browse files
app.py
CHANGED
@@ -27,7 +27,7 @@ def ask_openai(prompt, secret_word):
|
|
27 |
# Function to handle game logic
|
28 |
def jailbreak_game(user_prompt, current_level, attempts):
|
29 |
# Determine the secret word for the current level
|
30 |
-
if current_level >= len(new_year_levels)+1:
|
31 |
return ("Congratulations! π You have completed all levels. ", current_level, attempts)
|
32 |
|
33 |
secret_word = new_year_levels[current_level]
|
@@ -35,7 +35,7 @@ def jailbreak_game(user_prompt, current_level, attempts):
|
|
35 |
|
36 |
# Check if the secret word was revealed
|
37 |
if secret_word in ai_response.lower():
|
38 |
-
if current_level < len(new_year_levels):
|
39 |
return (
|
40 |
f"π You got it! The secret word for Level {current_level + 1} was '{secret_word}'. "
|
41 |
f"Get ready for Level {current_level + 1}! π₯³",
|
|
|
27 |
# Function to handle game logic
|
28 |
def jailbreak_game(user_prompt, current_level, attempts):
|
29 |
# Determine the secret word for the current level
|
30 |
+
if current_level >= len(new_year_levels)+ 1:
|
31 |
return ("Congratulations! π You have completed all levels. ", current_level, attempts)
|
32 |
|
33 |
secret_word = new_year_levels[current_level]
|
|
|
35 |
|
36 |
# Check if the secret word was revealed
|
37 |
if secret_word in ai_response.lower():
|
38 |
+
if current_level + 1 < len(new_year_levels):
|
39 |
return (
|
40 |
f"π You got it! The secret word for Level {current_level + 1} was '{secret_word}'. "
|
41 |
f"Get ready for Level {current_level + 1}! π₯³",
|