Browse Source

Force exact point numbers just in case

Kirk Trombley 4 years ago
parent
commit
6b3afc5be3
1 changed files with 2 additions and 1 deletions
  1. 2 1
      server/app/point_gen/__init__.py

+ 2 - 1
server/app/point_gen/__init__.py

@@ -16,7 +16,8 @@ def generate_points(config: GameConfig) -> List[Tuple[str, float, float]]:
     """
     Generate points according to the GameConfig.
     """
-    return source_groups[config.generation_method].get_points_from(config.rounds, config.country_lock)
+    # note - force exactly config.rounds points, even though most top level sources should be well-behaved in this regard
+    return source_groups[config.generation_method].get_points_from(config.rounds, config.country_lock)[:config.rounds]
 
 
 def restock_source(config: GameConfig):