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.
mastermind/Sources/ConsoleApp1/Program.cs

35 lines
700 B

using CoreLibrary.Persistance;
using CoreLibrary.Joueurs;
using System.Collections.Generic;
using CoreLibrary;
using CoreLibrary.Regles;
using CoreLibrary.Core;
PersistanceJSON p = new();
List<Joueur> mesJoueurs = new List<Joueur>([
new Joueur("Céleste"),
new Joueur("Pauline")
]);
p.Enregistrer<Joueur>(mesJoueurs.ToArray());
IEnumerable<Joueur> element = p.Charger<Joueur>();
foreach (Joueur joueur in element)
{
Console.WriteLine(joueur.Nom);
}
Partie partie1 = new Partie(null, null);
Partie partie2 = new Partie(null, null);
List<Partie> parties = new List<Partie> { partie1, partie2 };
p.Enregistrer<Partie>(parties.ToArray());