Skip to content
This repository has been archived by the owner on Nov 24, 2024. It is now read-only.

Commit

Permalink
Merge remote-tracking branch 'origin/backend'
Browse files Browse the repository at this point in the history
  • Loading branch information
deminearchiver committed Nov 24, 2024
2 parents 60ead2b + 2e6cbe3 commit 6bca0dd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions apps/backend/src/lib/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,11 @@ def return_last_data(user: User):
analytic = make_analytic_text_from_history(user.history)
return {"type": _type, "data": {"result": "lose", "analytic": analytic}}

if get_history_length(user) >= 10:
_type = "end"
analytic = make_analytic_text_from_history(user.history)
return {"type": _type, "data": {"result": "win", "analytic": analytic}}

last_event = get_latest_event_from_history(user.history)

if last_event is None:
Expand Down

0 comments on commit 6bca0dd

Please sign in to comment.