예제 #1
0
 public MatchResult GetMatchResult(int teamAID, int teamBID)
 {
     var mr = new MatchResult();
     mr.SetTeamAID(teamAID);
     mr.SetTeamBID(teamBID);
     mr.SetTeamAScore(teamAScore);
     mr.SetTeamBScore(teamBScore);
     return mr;
 }
예제 #2
0
 public void MatchStringTest()
 {
     var match = new MatchResult();
     match.SetTeamAID(1);
     match.SetTeamBID(2);
     var scoreTeamA = new Score();
     var scoreTeamB = new Score();
     match.SetTeamAScore(scoreTeamA);
     match.SetTeamBScore(scoreTeamB);
        // Assert.AreEqual(match.ToString(), "1: tag: 0, flag: 0, score 0, 2: tag: 0, flag: 0, score 0");
 }
예제 #3
0
 public MatchResult Clone()
 {
     var mr = new MatchResult();
     mr.SetMatchID(matchID);
     mr.SetTeamAID(teamAID);
     mr.SetTeamAScore(teamAScore);
     mr.SetTeamBID(teamBID);
     mr.SetTeamBScore(teamBScore);
     mr.SetPlayed(played);
     if (dummyGame)
     {
         mr.SetDummyGame(dummyGame);
     }
     return mr;
 }
예제 #4
0
 public void MatchWinnerTests()
 {
     var match = new MatchResult();
     match.SetTeamAID(1);
     match.SetTeamBID(2);
     var scoreTeamA = new Score();
     var scoreTeamB = new Score();
     for(int i = 0; i < 3; i++)
     {
         scoreTeamA.AddTag();
     }
     scoreTeamA.AddFlag();
     for(int i = 0; i < 10; i++)
     {
         scoreTeamB.AddTag();
     }
     match.SetTeamAScore(scoreTeamA);
     match.SetTeamBScore(scoreTeamB);
     Assert.AreEqual(2, match.GetWinner());
 }