@@ -60,7 +60,7 @@ def sort_dict[A, B](d: dict[A, B], *, reverse: bool = True) -> dict[A, B]:
6060
6161
6262@app .command ()
63- def run (jury_path : Path = "jury.txt" , participating_countries : int = 37 ) -> None : # pyright: ignore [reportArgumentType]
63+ def run (jury_path : Path = "jury.txt" , participating_countries : int = 37 , rest_of_world_vote : bool = True ) -> None : # pyright: ignore [reportArgumentType]
6464 """Run the ESC jury and televoting scoring prediction system."""
6565 jury_file = Path (jury_path )
6666 if not jury_file .exists ():
@@ -118,10 +118,11 @@ def run(jury_path: Path = "jury.txt", participating_countries: int = 37) -> None
118118 for _ in range (20 ):
119119 time .sleep (0.1 )
120120
121- # Compute the (participating_countries + 1)x58 total and subtract the N-1 sum
122- total_available = sum ((12 , 10 , 8 , 7 , 6 , 5 , 4 , 3 , 2 , 1 )) * (
123- participating_countries + 1
124- ) # N-1 televoting + 1 rest of the world
121+ # Compute the total available points
122+ # Each voting country gives 58 points total (12+10+8+7+6+5+4+3+2+1)
123+ # From 2023 onwards, there's also a "rest of the world" televote (+1)
124+ voting_countries = participating_countries + (1 if rest_of_world_vote else 0 )
125+ total_available = sum ((12 , 10 , 8 , 7 , 6 , 5 , 4 , 3 , 2 , 1 )) * voting_countries
125126 sum_entered = sum (televoting_data .values ())
126127 missing = set (jury_scores ) - set (televoting_data )
127128 country_to_predict = missing .pop ()
0 commit comments