소스 검색

Force exact point numbers just in case

Kirk Trombley 4 년 전
부모
커밋
6b3afc5be3
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  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):