Package fr.formiko.usuel
Class sauvegarderUnePartie
java.lang.Object
fr.formiko.usuel.sauvegarderUnePartie
Save a game.
- Author:
 - Hydrolien
 
- 
Field Summary
Fields - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionstatic PartieLoad a Partie.static Stringstatic StringgetRep()static SavegetSave()Save getter that is able to load Save from the file if null.static String[]listSave()make a list with all save in a [] and return it.static voidsauvegarder(Partie p, String fn)Save a Partie.private static voidprivate static voidstatic voidstatic voidstatic booleanDelete a save. 
- 
Field Details
- 
REP
 - 
fileName
 - 
save
 
 - 
 - 
Constructor Details
- 
sauvegarderUnePartie
public sauvegarderUnePartie() 
 - 
 - 
Method Details
- 
setS
 - 
getRep
 - 
getNomDuFichierComplet
 - 
getSave
Save getter that is able to load Save from the file if null. - 
setSave
 - 
sauvegarder
Save a Partie.
It use the java tools to save in byte code a Serializable Object.- Parameters:
 p- The Partie to savefn- The name of the output File (It will be place in REP/fileName.save)
 - 
sendMessageSaveFail
private static void sendMessageSaveFail() - 
sendMessageSaveWork
private static void sendMessageSaveWork() - 
charger
Load a Partie.
It use the java tools to load in byte code a Serializable Object.- Parameters:
 fn- The name of the input File (File will be REP/fileName.save)
 - 
supprimer
Delete a save.- Parameters:
 fn- The name of the file to delete
 - 
listSave
make a list with all save in a [] and return it.
return An array of every file aviable in REPSAVE sort in non-ascending order. 
 -