public Tri(string nature, int distanceNatation, int distanceVelo, int distanceCourse) { this.nature = nature; this.natation = new Epreuve("natation", distanceNatation); this.velo = new Epreuve("velo", distanceVelo); this.course = new Epreuve("course", distanceCourse); List <Participant> lesParticipants = new List <Participant>(); }
public void Add(Epreuve uneEpreuve, int tempsRealise) { Resultat result = new Resultat(unParticipant, uneEpreuve, tempsRealise); { if (resultatPresent(uneEpreuve.GetNom())) { this.lesResultats.Add(result); } } }
public bool resultatPresent(Epreuve uneEpreuve) { foreach (Resultat result in lesResultats) { if (result.GetEpreuve().GetNom() == uneEpreuve.GetNom()) { return(true); } } return(false); }
public Resultat(Participant unParticipant, Epreuve uneEpreuve, int tempsRealise) { this.unParticipant = unParticipant; this.uneEpreuve = uneEpreuve; this.tempsRealise = tempsRealise; }