|
@@ -153,7 +153,7 @@ async def submit_guess(round_number: conint(gt=0),
|
|
|
else:
|
|
|
score, distance = scoring.score((target.latitude, target.longitude), (guess.lat, guess.lng))
|
|
|
if game.round_point_cap is not None:
|
|
|
- score = min(score, max(0, game.round_point_cap - sum(g.round_score for p in game.players for g in p.guesses)))
|
|
|
+ score = min(score, max(0, game.round_point_cap - sum(g.round_score for p in game.players for g in p.guesses if g.round_number == round_number)))
|
|
|
added = queries.add_guess(db, guess, player, country_code, round_number, score)
|
|
|
if not added:
|
|
|
raise HTTPException(status_code=409, detail="Already submitted guess for this round")
|