Beispiel #1
0
 /// <summary>
 /// Initializes a new instance of the Match class
 /// </summary>
 /// <param name="date">Match date</param>
 /// <param name="matchScore">Match score</param>
 public Match(DateTime date, Score matchScore)
 {
     _matchDate = date;
     _id = objectCounter;
     objectCounter++;
     _matchScore = matchScore;
 }
Beispiel #2
0
 /// <summary>
 /// Initializes a new instance of the Match class
 /// </summary>
 /// <param name="date">Match date</param>
 /// <param name="matchScore">Match score</param>
 /// <param name="id">Initial instance id</param>
 public Match(DateTime date, Score matchScore, int id)
 {
     if (objectCounter <= id)
     {
         objectCounter = ++id;
     }
     _matchDate = date;
     _id = objectCounter;
     objectCounter++;
     _matchScore = matchScore;
 }
 /// <summary>
 /// Initializes a new instance of the TennisMatch class
 /// </summary>
 /// <param name="date">Match date</param>
 /// <param name="matchScore">Match score</param>
 /// <param name="id">Initial instance id</param>
 /// <param name="firstPlayerName">First player name</param>
 /// <param name="secondPlayerName">Second player name</param>
 public TennisMatch(DateTime date, Score matchScore, int id, string firstPlayerName, string secondPlayerName)
     : base(date, matchScore, id)
 {
     _firstPlayerName = firstPlayerName;
     _secondPlayerName = secondPlayerName;
 }
 /// <summary>
 /// Initializes a new instance of the FootballMatch class 
 /// </summary>
 /// <param name="date">Match date</param>
 /// <param name="matchScore">Match score</param>
 /// <param name="id">Initial instance id</param>
 /// <param name="firstTeamName">First team name</param>
 /// <param name="secondTeamName">Second team name</param>
 /// 
 public FootballMatch(DateTime date, Score matchScore, int id, string firstTeamName, string secondTeamName)
     : base(date, matchScore, id)
 {
     _firstTeamName = firstTeamName;
     _secondTeamName = secondTeamName;
 }