From 114f7e010422f893eea423891a7bd1d2c47802ec Mon Sep 17 00:00:00 2001 From: Theo_Dubo Date: Tue, 16 Apr 2019 13:32:12 +0000 Subject: [PATCH] =?UTF-8?q?Transf=C3=A9rer=20les=20fichiers=20vers=20'JAVA?= =?UTF-8?q?/PROJET-PMT=5FSTRI1A/src/modeles'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modeles/sauvegarde.java | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 JAVA/PROJET-PMT_STRI1A/src/modeles/sauvegarde.java 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