public static void Delete(bool suppression) { if (suppression) { ChoixPersistance <Classement> .Delete(); Sauvegarde = false; } }
public void TerminerJeu(bool sauvegarde, TypesPersistances type) { if (sauvegarde) { IPersistant <Classement> Persistance = ChoixPersistance <Classement> .CreatePersistance(type); Persistance.Save(this.Classement); Sauvegarde = true; } }
public Jeu(bool load) { Classement = new Classement(); _Des[0] = new De(); _Des[1] = new De(); if (load) { TypesPersistances type; if (File.Exists(ChoixPersistance <Classement> .Xml)) { type = TypesPersistances.Xml; } else if (File.Exists(ChoixPersistance <Classement> .Json)) { type = TypesPersistances.Json; } else { type = TypesPersistances.Binaire; } Classement = ChoixPersistance <Classement> .CreatePersistance(type).Load(); } }