diff --git a/__init__.py b/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/match.py b/match.py new file mode 100644 index 0000000..7cf1b2c --- /dev/null +++ b/match.py @@ -0,0 +1,10 @@ +from team import Team + +class Match: + def __init__(self, match_id, team1: Team, team2: Team, match_date, venue): + self.match_id = match_id + self.team1 = team1 + self.team2 = team2 + self.match_date = match_date + self.venue = venue + self.questions = {} # qid: question \ No newline at end of file diff --git a/player.py b/player.py new file mode 100644 index 0000000..89359c5 --- /dev/null +++ b/player.py @@ -0,0 +1,5 @@ +class Player: + def __init__(self, player_id, name, role): + self.player_id = player_id + self.name = name + self.role = role \ No newline at end of file diff --git a/team.py b/team.py new file mode 100644 index 0000000..6603e36 --- /dev/null +++ b/team.py @@ -0,0 +1,8 @@ +class Team: + def __init__(self, team_id, name): + self.team_id = team_id + self.name = name + self.players = [] + + def add_player(self, player): + self.players.append(player) diff --git a/tournament.py b/tournament.py new file mode 100644 index 0000000..89383b9 --- /dev/null +++ b/tournament.py @@ -0,0 +1,10 @@ +class Tournament: + def __init__(self, tournament_id, name, start_date, end_date): + self.tournament_id = tournament_id + self.name = name + self.start_date = start_date + self.end_date = end_date + self.matches = [] + + def add_match(self, match): + self.matches.append(match)