diff --git a/JAVA/PROJET-PMT_STRI1A/src/modeles/sauvegarde.java b/JAVA/PROJET-PMT_STRI1A/src/modeles/sauvegarde.java new file mode 100644 index 0000000..cc1d9da --- /dev/null +++ b/JAVA/PROJET-PMT_STRI1A/src/modeles/sauvegarde.java @@ -0,0 +1,34 @@ +package modeles; + +import java.io.File; +import java.io.FileWriter; +import java.io.IOException; + + +public class sauvegarde { + + public void enregistrerPersonnage(Labyrinthe lab) { + try { + File f= new File("./personnage.json"); + f.createNewFile(); + FileWriter fw= new FileWriter(f,true); + for (int i =0; i