Class sauvegarderUnePartie

java.lang.Object
fr.formiko.formiko.sauvegarderUnePartie

public class sauvegarderUnePartie extends Object
Save a game.
Author:
Hydrolien
  • Field Details

    • REP

      private static final String REP
    • fileName

      private static String fileName
    • save

      private static fr.formiko.usual.Save save
  • Constructor Details

    • sauvegarderUnePartie

      public sauvegarderUnePartie()
  • Method Details

    • setS

      public static void setS(String s2)
    • getRep

      public static String getRep()
    • getNomDuFichierComplet

      public static String getNomDuFichierComplet()
    • getSave

      public static fr.formiko.usual.Save getSave()
      Save getter that is able to load Save from the file if null.
    • setSave

      public static void setSave(fr.formiko.usual.Save sa)
    • sauvegarder

      public static void sauvegarder(Partie p, String fn)
      Save a Partie.
      It use the java tools to save in byte code a Serializable Object.
      Parameters:
      p - The Partie to save
      fn - 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

      public static Partie charger(String fn)
      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

      public static boolean supprimer(String fn)
      Delete a save.
      Parameters:
      fn - The name of the file to delete
    • listSave

      public static String[] 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.