-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclub.py
38 lines (33 loc) · 1.02 KB
/
club.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#-------------------------------------------------------------------------------
# Name: club
# Purpose:
#
# Author: Lorenzo Bolognese
#
# Created: 29/11/2019
# Copyright: (c) Lorenzo Bolognese 2019
# Licence: MIT
#-------------------------------------------------------------------------------
class Club(object):
def __init__(self, name, tactics, chariness, roster):
self.name = name
self.tactics = tactics()
self.chariness = chariness
self.roster = roster
self.played = 0
self.draw = 0
self.won = 0
self.lost = 0
self.points = 0
self.goalFor = 0
self.goalAgainst = 0
def SelectTeam(self, tactics, chariness, playersList):
self.tactics = tactics
self.tactics.Set(playersList, chariness)
def GetPlayerInfo(self):
l = []
for p in self.roster:
l.append([p.role, p.name, self.name, p.GetAvarageVote(), p.GetPlayedMatches()])
return l
if __name__ == '__main__':
pass