You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# TODO Create method to check of if tournament exists
# labels: state# Do a check if the category and channel have already been created.awaitself.start_signup_command(ctx, self.tournaments[id]['channel_name'], f'General - {id}', reaction, OUTPUTS['SIGNUP'])
returnTournamentStatus.SIGNUPS_STARTEDdefstart_tournament(self, id: str) ->TournamentStatus:
"""Sets tournament stats to True and sets the signed up players to the active list"""# TODO Create method to check of if tournament exists# labels: quick, state, duplicate# This is code duplication, create a method for thisif (tournament:=self.tournaments.get(id)) ==None:
returnTournamentStatus.TOURNAMENT_NOT_FOUNDiftournament['status'] ==False:
response=self.client.send_data('/start_tournament', { 'id': tournament['id'], 'tournament': tournament }, 'start_tournament')
ifresponse.status_code!=200:
returnTournamentStatus.ERROR_STATUS_CODEtournament['status'] =Truetournament['players_attended'] =tournament['players_signed_up']
returnTournamentStatus.TOURNAMENT_STARTEDdefplayer_signed_up(self, id, player):
"""Stores the player who just signed up in state and sends data to API"""response=self.client.send_data('/player_signed_up', { 'id': id, 'player': player }, 'player_signed_up')
print(response.status_code)
ifresponse.status_code!=200:
returnTournamentStatus.ERROR_STATUS_CODEself.tournaments[id]['players_signed_up'].append(player)
print('Client -> ', self.tournaments)
returnTournamentStatus.PLAYER_SIGNED_UPdefplayer_removed_from_signups(self, id, player):
"""Removes player from signups"""
b663533b9eeadd24b23484156fe124caf289ef3e
The text was updated successfully, but these errors were encountered:
Create method to check of if tournament exists
This is code duplication, create a method for this
tournam8/src/state/tournament_state.py
Line 92 in 572b11e
b663533b9eeadd24b23484156fe124caf289ef3e
The text was updated successfully, but these errors were encountered: