Beispiel #1
0
        public RecentMatch(string teamName, MatchResult result)
        {
            if (result.TeamName1 == teamName)
              {
            OpponentTeamName = result.TeamName2;
              }
              else
              {
            OpponentTeamName = result.TeamName1;
              }

              if (result.IsTie)
              {
            Result = "Tie";
              }
              else if (result.WinnerTeamName == teamName)
              {
            Result = "Win";
              }
              else
              {
            Result = "Loss";
              }
        }
Beispiel #2
0
 public bool IsSameMatchup(MatchResult matchResult)
 {
     return matchResult.TeamName1 == TeamName1 && matchResult.TeamName2 == TeamName2
       || matchResult.TeamName1 == TeamName2 && matchResult.TeamName2 == TeamName1;
 }
Beispiel #3
0
 public void Add(MatchResult mr)
 {
     if (mr.IsTie)
       {
     _ties++;
       }
       else if (mr.LoserTeamName.Equals(_teamName))
       {
     _losses++;
       }
       else if (mr.WinnerTeamName.Equals(_teamName))
       {
     _wins++;
       }
 }