From 6a7c8c5d4fbc6efd0ed14450a2059b79913b9cb8 Mon Sep 17 00:00:00 2001 From: AUGUSTIN_100 Date: Sun, 25 Sep 2022 20:20:32 +0200 Subject: [PATCH] Stub Joueur et Equipe --- Sources/BowlingLib/Model/Iloader.cs | 6 ++++++ Sources/BowlingStub/StubEquipe.cs | 24 ++++++++++++++++++++++++ Sources/BowlingStub/StubJoueur.cs | 18 ++++++++++++++++++ 3 files changed, 48 insertions(+) create mode 100644 Sources/BowlingLib/Model/Iloader.cs create mode 100644 Sources/BowlingStub/StubEquipe.cs create mode 100644 Sources/BowlingStub/StubJoueur.cs diff --git a/Sources/BowlingLib/Model/Iloader.cs b/Sources/BowlingLib/Model/Iloader.cs new file mode 100644 index 0000000..93593be --- /dev/null +++ b/Sources/BowlingLib/Model/Iloader.cs @@ -0,0 +1,6 @@ +using System; + +public interface Iloader +{ + +} diff --git a/Sources/BowlingStub/StubEquipe.cs b/Sources/BowlingStub/StubEquipe.cs new file mode 100644 index 0000000..ae8f036 --- /dev/null +++ b/Sources/BowlingStub/StubEquipe.cs @@ -0,0 +1,24 @@ +using System; + +public class StubEquipe +{ + private List listEquipes = new List(); + public StubEquipe() + { + } + + public List ListEquipes(int n = 10, int j = 2) + { + for (int i = 0; i < n; i++) + { + listEquipes.Add(new Equipe() { Nom = "Equipe " + i + 1 }); + + for(int k = 0; k < j; k++) + { + listEquipes.ElementAt(i).AjouterJoueur(new Joueur("Joueur " + i + 1 + "-" + k + 1)); + + } + } + } + +} diff --git a/Sources/BowlingStub/StubJoueur.cs b/Sources/BowlingStub/StubJoueur.cs new file mode 100644 index 0000000..9a8ad90 --- /dev/null +++ b/Sources/BowlingStub/StubJoueur.cs @@ -0,0 +1,18 @@ +using System; + +public class StubJoueur +{ +private List listJoueurs = new List(); + public StubJoueur() + { + } + + public List ListJoueurs(int n = 10) + { + for (int i = 0; i < n; i++) + { + listJoueurs.Add(new Joueur() { Pseudo = "Joueur "+i+1 }); + } + } + +}