Classe Partie
continuous-integration/drone/push Build is passing Details

master
Pauline PRADY 1 year ago
parent b0a2d916d4
commit 33c2b4ff03

@ -0,0 +1,4 @@
using CoreLibrary;
Partie maPartie = new Partie(new ReglesClassiques());
maPartie.Jouer();

@ -37,8 +37,6 @@
public Jeton RecupererJeton(int indice) public Jeton RecupererJeton(int indice)
{ {
if(indice < 0 || indice > TailleMaximale())
throw new CodeIndiceHorsDePorteeException();
Jeton? jeton = lesJetons[indice]; Jeton? jeton = lesJetons[indice];

@ -17,24 +17,43 @@
while (!regles.EstTerminee()) while (!regles.EstTerminee())
{ {
// ?? Joueur joueurCourant = regles.JoueurCourant();
Plateau plateauCourant = joueurCourant.Plateau;
Code code = regles.GenererCode();
while (!code.EstComplet())
{
AjouterJeton(code);
}
plateauCourant.AjouterCode(code);
regles.PasserLaMain();
} }
PartieTerminee(); PartieTerminee();
} }
private void AjouterJeton(Code code)
{
Jeton jeton = new Jeton(Couleur.ROUGE);
code.AjouterJeton(jeton);
}
private void DefinirJoueurs() private void DefinirJoueurs()
{ {
while(regles.NbJoueurs != regles.NbJoueursMaximum) while(regles.NbJoueurs != regles.NbJoueursMaximum)
{ {
// string nom = "pauline";
regles.AjouterJoueur(nom);
} }
} }
private void PartieTerminee() private void PartieTerminee()
{ {
regles.Gagnants();
regles.Perdants();
} }

Loading…
Cancel
Save