[Eva] ChooseWord /next: time_limit + новый return
This commit is contained in:
+2
-8
@@ -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,
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user