# secondary = aspects_sorted[-1][1] else: primary = aspects_sorted[0][1] secondary = aspects_sorted[1][1] descriptor_options = DESCRIPTOR_DB[stat][primary][secondary] for option, threshold in zip(descriptor_options, ASPECTS[stat][1]): if high_threshold < threshold: return option raise RuntimeError(f"Could not build a descriptor for {stat} and player {player}!" f"High threshold: {high_threshold}, options: {descriptor_options}") if __name__ == "__main__": from blaseball.stats import players pb = players.PlayerBase(3) for i in range(1001, 1004): text = pb[i].text_breakdown().split("\r\n") PRINT_ALL = False if PRINT_ALL: lines = range(0, len(text)) else: lines = [4, 5, 10, 11, 12, 13, 14, 15, 16] + list(range(27, 40)) + list(range(51, 94)) for j in lines: if PRINT_ALL: print(f"{j}: {text[j]}") else: try: print(text[j])
def league_2(): pb = players.PlayerBase() l = teams.League(pb, teamdata.TEAMS_99[0:2]) return l
def test_init(self): pb = players.PlayerBase() league = League(pb, ["test team 1", "test team 2"]) assert len(league) == 2 assert pb.verify_players()
def league_20(): pb = players.PlayerBase() l = League(pb, teamdata.TEAMS_99) return l
def test_init(self): pb = players.PlayerBase() pb.new_players(10) team = Team("test team 1", list(pb.players.values())) assert len(team) == 10