[Eva] ChooseWord /next: time_limit + новый return

This commit is contained in:
2026-10-15 17:01:55 +00:00
parent 34bae9bb6a
commit 7ddfc2e451
+2 -8
View File
@@ -113,20 +113,14 @@ async def get_next_quiz(request: Request):
options = wrong_options + [correct_polish]
random.shuffle(options)
if total_guessed <= 10:
difficulty = "easy"
elif total_guessed <= 30:
difficulty = "medium"
elif total_guessed <= 60:
difficulty = "hard"
else:
difficulty = "expert"
time_limit = 10 if difficulty == "hard" else None
return {
"correct_polish": correct_polish,
"translation": translation,
"options": options,
"difficulty": difficulty,
"time_limit": time_limit,
}