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); }
private RankingEntry EntryFromClub(Club c) { foreach (RankingEntry entry in entries) if (entry.Club == c) return entry; return null; }
public Match(Club home, Club away, int hgoals, int agoals) { this.home = home; this.away = away; this.homeGoals = hgoals; this.awayGoals = agoals; }
public Match(Club home, Club away, bool isHomeForfeit, bool isAwayForfeit) { this.home = home; this.away = away; this.isHomeForfeit = isHomeForfeit; this.isAwayForfeit = isAwayForfeit; }
public RankingEntry(Club club, PointSystem.ITotal points) { this.club = club; this.points = points; }
public PointSystem.ITotal GetPoints(Club club) { return EntryFromClub(club).Points; }
public void Initialiser() { unClubBienPourriHome = new Club("unClubBienPourri"); unClubAuHasartAway = new Club("unClubAuHasart"); }
public void PeutRetournerLeNomDuClub() { String nomDuClub = "unClubPourri"; Club unClub = new Club(nomDuClub); Assert.AreEqual(unClub.ToString(), nomDuClub); }