Skip to content

Commit

Permalink
add extra file for future. Not used anywhere in current setup
Browse files Browse the repository at this point in the history
  • Loading branch information
punitvara committed Jun 24, 2023
1 parent de3c306 commit ed0ca95
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 0 deletions.
Empty file added __init__.py
Empty file.
10 changes: 10 additions & 0 deletions match.py
Original file line number Diff line number Diff line change
@@ -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
5 changes: 5 additions & 0 deletions player.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class Player:
def __init__(self, player_id, name, role):
self.player_id = player_id
self.name = name
self.role = role
8 changes: 8 additions & 0 deletions team.py
Original file line number Diff line number Diff line change
@@ -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)
10 changes: 10 additions & 0 deletions tournament.py
Original file line number Diff line number Diff line change
@@ -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)

0 comments on commit ed0ca95

Please sign in to comment.