You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
932 B
30 lines
932 B
using System;
|
|
using System.Reflection;
|
|
|
|
namespace BibliothequeClasses
|
|
{
|
|
public class Plateau
|
|
{
|
|
private static int tailleMax = 12;
|
|
private CombinaisonSecrete combinaisonSecrete = new CombinaisonSecrete();
|
|
private CombinaisonJoueur[] lesCombinaisonsJoueur = new CombinaisonJoueur[tailleMax];
|
|
private Combinaison[] lesCombinaisonsIndicateur = new CombinaisonIndicateur[tailleMax];
|
|
private int index = 0;
|
|
|
|
|
|
public bool AjouterCombinaison(CombinaisonJoueur combinaisonJoueur)
|
|
{
|
|
if (index < tailleMax)
|
|
{
|
|
lesCombinaisonsJoueur[index] = combinaisonJoueur;
|
|
index++;
|
|
return true;
|
|
}
|
|
else
|
|
{
|
|
throw new Exception("Le plateau est plein, impossible d'ajouter une combinaison supplémentaire.");
|
|
}
|
|
}
|
|
}
|
|
}
|