Skip to content

Commit

Permalink
Add explanatory note
Browse files Browse the repository at this point in the history
  • Loading branch information
meooow25 committed Mar 31, 2024
1 parent 559ac24 commit 60ac2fc
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions carrot/src/background/predict.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,13 @@ export class Contestant {
this.points = points;
this.penalty = penalty;
this.rating = rating;

this.effectiveRating = rating == null || rating == 0 ? DEFAULT_RATING : rating;
// Note: The rating == 0 check is a band-aid for CF's fake ratings (see Github #18).
// If CF tells us that a user has rating 0, we consider that the user is in fact unrated.
// This unfortunately means that a user who truly has rating 0 will be considered to have
// DEFAULT_RATING, but such cases are unlikely compared to the regular presence of unrated
// users.

this.rank = null;
this.delta = null;
Expand Down

0 comments on commit 60ac2fc

Please sign in to comment.