|
|
|
@ -0,0 +1,31 @@
|
|
|
|
|
namespace BibliothequeClasses
|
|
|
|
|
{
|
|
|
|
|
public class Combinaison
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
private int taillePhysique = 4;
|
|
|
|
|
private int tailleLogique = 0;
|
|
|
|
|
private Jeton[] lesJetons = new Jeton[0];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public Jeton GetJeton(int indice)
|
|
|
|
|
{
|
|
|
|
|
return lesJetons[indice];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void AjouterJeton(Jeton jeton)
|
|
|
|
|
{
|
|
|
|
|
lesJetons[tailleLogique++] = jeton;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void SupprimerDernierJeton()
|
|
|
|
|
{
|
|
|
|
|
--tailleLogique;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public bool EstComplet()
|
|
|
|
|
{
|
|
|
|
|
return tailleLogique == taillePhysique;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|