|
__init__(self,
home_club,
away_club)
Constructs a match between teams of the given clubs, with no goals
scored (yet). |
|
|
club object
|
|
club object
|
get_away_club(self)
Returns the club who is visiting the home club to play the match. |
|
|
|
add_home_goal(self)
Records a goal as having been scored in the match by the home team. |
|
|
|
add_away_goal(self)
Records a goal as having been scored in the match by the away team. |
|
|
int
|
get_home_goals(self)
Returns the number of goals scored by the home team. |
|
|
int
|
get_away_goals(self)
Returns the number of goals scored by the away team. |
|
|
int, >= 0
|
get_goal_difference(self)
Returns the goal difference of the match as an absolute value
(absolute value: 2 - 3 returns 1). |
|
|
int
|
get_total_goals(self)
Returns the total number of goals scored by the two teams. |
|
|
boolean
|
is_home_win(self)
Returns a boolean value indicating if the home team won. |
|
|
boolean
|
is_away_win(self)
Returns a boolean value indicating if the away team won. |
|
|
boolean
|
is_draw(self)
Returns a boolean value indicating if the match ended in a draw. |
|
|
boolean
|
is_higher_scoring_than(self,
another_match)
Returns a boolean value indicating if the match had a higher number
of goals than another given match. |
|
|
string
|
get_location(self)
Returns the name of the stadium at which the game is played. |
|
|
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__ ,
__sizeof__ ,
__str__ ,
__subclasshook__
|