Package fr.formiko.usuel
Class sauvegarderUnePartie
java.lang.Object
fr.formiko.usuel.sauvegarderUnePartie
Save a game.
- Author:
- Hydrolien
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Partie
Load a Partie.static String
static String
getRep()
static Save
getSave()
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 void
sauvegarder(Partie p, String fn)
Save a Partie.private static void
private static void
static void
static void
static boolean
Delete 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.
-