set max innings of debug tournament round to 3 for faster testing

This commit is contained in:
Sakimori 2021-01-03 06:09:27 -05:00
parent 12255e3eef
commit d5f2ceeac9
2 changed files with 3 additions and 3 deletions

View File

@ -19,13 +19,13 @@ class division(object):
self.teams = {} #key: team object, value: {wins; rd (run diff)} self.teams = {} #key: team object, value: {wins; rd (run diff)}
class tournament(object): class tournament(object):
def __init__(self, name, team_dic, series_length = 5, maxinnings = 9): def __init__(self, name, team_dic, series_length = 5, max_innings = 9):
self.name = name self.name = name
self.teams = team_dic #same format as division, wins/losses will be used for seeding later self.teams = team_dic #same format as division, wins/losses will be used for seeding later
self.bracket = None self.bracket = None
self.results = None self.results = None
self.series_length = series_length self.series_length = series_length
self.game_length = maxinnings self.game_length = max_innings
self.active = False self.active = False
def build_bracket(self, random_sort = False, by_wins = False): def build_bracket(self, random_sort = False, by_wins = False):

View File

@ -448,7 +448,7 @@ class StartTournamentCommand(Command):
games.get_team("Pigeons Reckoning") : {"wins": 0, "rd": 0}, games.get_team("Pigeons Reckoning") : {"wins": 0, "rd": 0},
games.get_team("Kernow Technologists") : {"wins": 0, "rd": 0} games.get_team("Kernow Technologists") : {"wins": 0, "rd": 0}
} }
tourney = leagues.tournament("Test Tourney", test_bracket) tourney = leagues.tournament("Test Tourney", test_bracket, max_innings=3)
tourney.build_bracket(random_sort=True) tourney.build_bracket(random_sort=True)
tourney_task = asyncio.create_task(start_tournament_round(msg.channel, tourney)) tourney_task = asyncio.create_task(start_tournament_round(msg.channel, tourney))