add campaign & round
This commit is contained in:
parent
9e966baf9b
commit
1218f32752
10 changed files with 365 additions and 24 deletions
|
|
@ -9,7 +9,7 @@ class Campaign:
|
|||
self.name = name
|
||||
self.month = datetime.now().month
|
||||
self.entrants = {}
|
||||
self.rounds = {}
|
||||
self.rounds = []
|
||||
self.is_over = False
|
||||
|
||||
def set_id(self, new_id):
|
||||
|
|
@ -42,4 +42,20 @@ class Campaign:
|
|||
## entrants placeholder
|
||||
## rounds placeholder
|
||||
tmp.set_state(is_over)
|
||||
return tmp
|
||||
return tmp
|
||||
|
||||
def add_round(self, number: int) -> Round:
|
||||
round = Round()
|
||||
self.rounds.append(round)
|
||||
return round
|
||||
|
||||
def get_round(self, round_id) -> Round:
|
||||
return self.rounds[round_id]
|
||||
|
||||
def get_all_rounds(self) -> list[Round]:
|
||||
return list(self.rounds)
|
||||
|
||||
def add_round(self) -> Round:
|
||||
round = Round()
|
||||
self.rounds.append(round)
|
||||
return round
|
||||
Loading…
Add table
Add a link
Reference in a new issue