|
|
|
@ -1,40 +0,0 @@
|
|
|
|
|
using CoreLibrary.Core;
|
|
|
|
|
using CoreLibrary.Joueurs;
|
|
|
|
|
using System.Reflection;
|
|
|
|
|
|
|
|
|
|
Code codeSecret = new Code(1);
|
|
|
|
|
codeSecret.AjouterJeton(new Jeton(Couleur.Rouge));
|
|
|
|
|
|
|
|
|
|
Code code1 = new Code(1);
|
|
|
|
|
code1.AjouterJeton(new Jeton(Couleur.Vert));
|
|
|
|
|
|
|
|
|
|
Code code2 = new Code(1);
|
|
|
|
|
code2.AjouterJeton(new Jeton(Couleur.Jaune));
|
|
|
|
|
|
|
|
|
|
List<Code> codes = new List<Code>([
|
|
|
|
|
codeSecret,
|
|
|
|
|
code1,
|
|
|
|
|
code2,
|
|
|
|
|
]);
|
|
|
|
|
|
|
|
|
|
Plateau plateau = new Plateau(1, 1);
|
|
|
|
|
|
|
|
|
|
FieldInfo? codeSecretInfo = typeof(Plateau).GetField("codeSecret", BindingFlags.NonPublic | BindingFlags.Instance);
|
|
|
|
|
|
|
|
|
|
codeSecretInfo.SetValue(plateau, codeSecret);
|
|
|
|
|
|
|
|
|
|
codeSecretInfo = typeof(Plateau).GetField("codeSecret", BindingFlags.NonPublic | BindingFlags.Instance);
|
|
|
|
|
|
|
|
|
|
plateau.AjouterCode(codeSecret);
|
|
|
|
|
var a = codeSecretInfo.GetValue(plateau);
|
|
|
|
|
var b = plateau.Grille;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MethodInfo? SupprimerCodesImpossiblesInfo = typeof(Robot).GetMethod("SupprimerCodesImpossibles", BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.Static);
|
|
|
|
|
|
|
|
|
|
SupprimerCodesImpossiblesInfo.Invoke(new Robot(), [codes, plateau]);
|
|
|
|
|
|
|
|
|
|
Console.ReadLine();
|