public PointTotal(Match m, bool home)
 {
     points = m.HomeGoals + m.AwayGoals;
     if (home)
         goalaverage = m.HomeGoals - m.AwayGoals;
     else
         goalaverage = m.AwayGoals - m.HomeGoals;
 }
예제 #2
0
 public void Register(Match m)
 {
     EntryFromClub(m.Home).Points.Increment(system.GetPointsFromMatch(m, true));
     EntryFromClub(m.Away).Points.Increment(system.GetPointsFromMatch(m, false));
     Array.Sort(entries);
 }
 public Itotal GetPointsFromMatch(Match m, bool isHome)
 {
     return new Itotal(m, isHome);
 }
예제 #4
0
 public void PeutSavoirSiLeClubHomeAFaitForfait()
 {
     Match unMatch = new Match(unClubBienPourriHome, unClubAuHasartAway, true, false);
     Assert.AreEqual(true, unMatch.IsHomeForfeit);
 }
예제 #5
0
 public void PeutSavoirSiLesCLubOntFaitUnMatchNull()
 {
     Match unMatch = new Match(unClubBienPourriHome, unClubAuHasartAway, 1, 1);
     Assert.AreEqual(true, unMatch.IsDraw);
 }
예제 #6
0
 public void PeutRetournerLeBonNombreDeButDuClubHome()
 {
     Match unMatch = new Match(unClubBienPourriHome, unClubAuHasartAway, 1, 0);
     Assert.AreEqual(1, unMatch.HomeGoals);
 }
예제 #7
0
 public void PeutRetournerLeBonClubHome()
 {
     Match unMatch = new Match(unClubBienPourriHome, unClubAuHasartAway, false, false);
     Assert.AreEqual(unMatch.Home, unClubBienPourriHome);
 }
예제 #8
0
 public void PeutRetourneLeBonNombreDeButDuClubAway()
 {
     Match unMatch = new Match(unClubBienPourriHome, unClubAuHasartAway, 0, 1);
     Assert.AreEqual(1, unMatch.AwayGoals);
 }
 public TotalMock(Match m, bool home)
 {
     this.points = m.GetGoals(home) - m.GetGoals(!home);
 }
 public override ITotal GetPointsFromMatch(Match m, bool isHome)
 {
     return new TotalMock(m, isHome);
 }