init
This commit is contained in:
22
app/services/scoring.py
Normal file
22
app/services/scoring.py
Normal file
@@ -0,0 +1,22 @@
|
||||
"""Daily scoring engine — calculates points per user.
|
||||
|
||||
TODO: Implement in Phase 2 (scoring system).
|
||||
"""
|
||||
|
||||
from sqlmodel import Session
|
||||
|
||||
|
||||
def calculate_daily_scores(session: Session) -> int:
|
||||
"""Run daily score calculation for all users.
|
||||
|
||||
Returns the number of users scored.
|
||||
|
||||
Not yet implemented — will be triggered by a cron job or manual call.
|
||||
"""
|
||||
# Phase 2: For each user, compute:
|
||||
# - base_pts: 1 pt per 1,000 m² zone area held
|
||||
# - defense bonus: +20% per defense level above 1
|
||||
# - capture bonus: +50 pts per zone captured that day
|
||||
# - streak bonus: x(1 + streak_days * 0.05), capped at 2x
|
||||
# - activity bonus: +10 pts per km covered
|
||||
return 0
|
||||
Reference in New Issue
Block a user