예제 #1
0
        public static void Delete(bool suppression)
        {
            if (suppression)
            {
                ChoixPersistance <Classement> .Delete();

                Sauvegarde = false;
            }
        }
예제 #2
0
        public void TerminerJeu(bool sauvegarde, TypesPersistances type)
        {
            if (sauvegarde)
            {
                IPersistant <Classement> Persistance = ChoixPersistance <Classement> .CreatePersistance(type);

                Persistance.Save(this.Classement);
                Sauvegarde = true;
            }
        }
예제 #3
0
 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();
     }
 }