Home | Trees | Indices | Help |
|
---|
|
object --+ | Match
The class Match
represents match results in a football
match statistics program. A match is played between teams from two clubs:
a home club and an away club. Goals scored by players from either team
can be added to the match object with the method add_goal
.
The class is expected to be used so that a match object is initially
creates as a real-life match starts and goals are added incrementally as
the match progresses.
|
|||
|
|||
club object |
|
||
club object |
|
||
|
|||
int |
|
||
int |
|
||
int |
|
||
int |
|
||
boolean |
|
||
boolean |
|
||
boolean |
|
||
club object |
|
||
player object |
|
||
bolean |
|
||
string |
|
||
Inherited from |
|
|||
Inherited from |
|
Constructs a match between teams of the given clubs, with no goals scored (yet).
|
Returns the club who hosts the match.
|
Returns the club who is visiting the home club to play the match.
|
Records a goal as having been scored in the match. Whether the goal is a home goal or an away goal is determined by checking the employer of the given goal scorer. (If the given scorer is not employed by either club, the method does nothing.)
|
Returns the number of goals scored by the home team.
|
Returns the number of goals scored by the away team.
|
Returns the total number of goals scored by the two teams.
|
Returns the goal difference of the match as an absolute value. (i.e. 2 - 3 returns 1) A tied match has a goal difference of zero.
|
Returns a boolean value indicating if the home team won.
|
Returns a boolean value indicating if the away team won.
|
Returns a boolean value indicating if the match ended in a draw.
|
Returns the club whose team won the match (or is about to win it, assuming the current result stands). That is, returns the club who has scored more goals than the other one.
|
Returns the player who scored the so-called "winning goal". The winning goal of a match is the first goal for the winning team scoring which was "necessary" in light of the match scoreline. For instance, if the score is 4-2 to the home team, then the third goal scored by the home team is the "winning goal". A tied match has no winning goal or winning goal scorer.
|
Returns a boolean value indicating if the match had a higher number of goals than another given match.
See Also: #get_total_goals() |
Returns the name of the stadium at which the game is played. That is, returns the home club's home stadium.
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Thu Sep 13 13:35:13 2012 | http://epydoc.sourceforge.net |