|
|
@ -37,23 +37,24 @@ namespace UnitTesting
|
|
|
|
PropertyInfo? termineField = typeof(Partie).GetProperty("Termine", BindingFlags.Public | BindingFlags.Instance);
|
|
|
|
PropertyInfo? termineField = typeof(Partie).GetProperty("Termine", BindingFlags.Public | BindingFlags.Instance);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (joueursField != null && plateauxField != null)
|
|
|
|
|
|
|
|
{
|
|
|
|
Dictionary<string, bool>? joueurs = joueursField.GetValue(partieOriginale) as Dictionary<string, bool>;
|
|
|
|
Dictionary<string, bool>? joueurs = joueursField.GetValue(partieOriginale) as Dictionary<string, bool>;
|
|
|
|
|
|
|
|
|
|
|
|
if (joueurs != null)
|
|
|
|
if (joueurs != null)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
joueurs.Add("Joueur1", false);
|
|
|
|
joueurs.Add("Joueur1", false);
|
|
|
|
joueurs.Add("Joueur2", true);
|
|
|
|
joueurs.Add("Joueur2", true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
List<Plateau>? plateaux = plateauxField.GetValue(partieOriginale) as List<Plateau>;
|
|
|
|
List<Plateau>? plateaux = plateauxField.GetValue(partieOriginale) as List<Plateau>;
|
|
|
|
|
|
|
|
|
|
|
|
if (plateaux != null)
|
|
|
|
if (plateaux != null)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
plateaux.Add(new Plateau(4, 10));
|
|
|
|
plateaux.Add(new Plateau(4, 10));
|
|
|
|
plateaux.Add(new Plateau(4, 10));
|
|
|
|
plateaux.Add(new Plateau(4, 10));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(tourField != null)
|
|
|
|
if(tourField != null)
|
|
|
|
tourField.SetValue(partieOriginale, 5);
|
|
|
|
tourField.SetValue(partieOriginale, 5);
|
|
|
|
|
|
|
|
|
|
|
@ -98,3 +99,4 @@ namespace UnitTesting
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|