def execute(self, options: argparse.Namespace) -> None: self.game_path = Path(options.game_file) if 'seed' in options: self.seed = options.seed data = ch13_r05.roll_iter(options.games, self.seed) ch13_r05.write_rolls(self.game_path, data) print(f"Created {str(self.game_path)}")
def execute(self, options: argparse.Namespace) -> None: if 'seed' in options: self.seed = options.seed if 'games' in options: self.games = options.games data = ch13_r05.roll_iter(self.games, self.seed) game_statistics = ch13_r06.gather_stats(data) print(game_statistics)
def execute(self, options: argparse.Namespace) -> None: self.game_path = Path(options.game_file) data = ch13_r05.roll_iter(options.games, self.seed) ch13_r05.write_rolls(self.game_path, data) print("Created", self.game_path)
def summarize_games( total_games: int, *, seed: int = None ) -> Counter[Outcome]: game_statistics = gather_stats( roll_iter(total_games, seed=seed)) return game_statistics