Beispiel #1
0
 public Ranking(PointSystem system, Club [] clubs)
 {
     this.system = system;
     this.entries=new RankingEntry[clubs.Length];
     for(int i=0; i<clubs.Length; i++)
         this.entries[i]=new RankingEntry(clubs[i], system.InitialPoints);
 }
Beispiel #2
0
 private RankingEntry EntryFromClub(Club c)
 {
     foreach (RankingEntry entry in entries)
         if (entry.Club == c)
             return entry;
     return null;
 }
Beispiel #3
0
 public Match(Club home, Club away, int hgoals, int agoals)
 {
     this.home = home;
     this.away = away;
     this.homeGoals = hgoals;
     this.awayGoals = agoals;
 }
Beispiel #4
0
 public Match(Club home, Club away, bool isHomeForfeit, bool isAwayForfeit)
 {
     this.home = home;
     this.away = away;
     this.isHomeForfeit = isHomeForfeit;
     this.isAwayForfeit = isAwayForfeit;
 }
Beispiel #5
0
 public RankingEntry(Club club, PointSystem.ITotal points)
 {
     this.club = club;
     this.points = points;
 }
Beispiel #6
0
 public PointSystem.ITotal GetPoints(Club club)
 {
     return EntryFromClub(club).Points;
 }
Beispiel #7
0
 public void Initialiser()
 {
     unClubBienPourriHome = new Club("unClubBienPourri");
     unClubAuHasartAway = new Club("unClubAuHasart");
 }
Beispiel #8
0
 public void PeutRetournerLeNomDuClub()
 {
     String nomDuClub = "unClubPourri";
     Club unClub = new Club(nomDuClub);
     Assert.AreEqual(unClub.ToString(), nomDuClub);
 }