From 146ae8115ec76ba6a13fb95bcc89e6a3f1b8aeb8 Mon Sep 17 00:00:00 2001 From: Theo_Dubo Date: Thu, 18 Apr 2019 14:12:20 +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 --- .../PROJET-PMT_STRI1A/src/modeles/Potion.java | 4 +- JAVA/PROJET-PMT_STRI1A/src/modeles/Salle.java | 51 ++++++++++++++----- .../src/modeles/sauvegarde.java | 24 ++++++--- 3 files changed, 56 insertions(+), 23 deletions(-) diff --git a/JAVA/PROJET-PMT_STRI1A/src/modeles/Potion.java b/JAVA/PROJET-PMT_STRI1A/src/modeles/Potion.java index bd441c2..5e57481 100644 --- a/JAVA/PROJET-PMT_STRI1A/src/modeles/Potion.java +++ b/JAVA/PROJET-PMT_STRI1A/src/modeles/Potion.java @@ -18,9 +18,7 @@ public class Potion extends Objet { public void utilisation() { super.utilisation(); - this.getProprietaire().soin(this.getProprietaire().getPVmax()); // - - + this.getProprietaire().soin(this.getProprietaire().getpVieMax()); } diff --git a/JAVA/PROJET-PMT_STRI1A/src/modeles/Salle.java b/JAVA/PROJET-PMT_STRI1A/src/modeles/Salle.java index 48aee2d..161e168 100644 --- a/JAVA/PROJET-PMT_STRI1A/src/modeles/Salle.java +++ b/JAVA/PROJET-PMT_STRI1A/src/modeles/Salle.java @@ -1,12 +1,39 @@ -/** - * - */ -package modeles; - -/** - * @author flavien - * - */ -public class Salle { - -} +/** + * + */ +package modeles; + +import java.util.ArrayList; +import java.util.List; + +/** + * @author flavien + * + */ +public class Salle { + private int positionX; + private int positionY; + private boolean sortie; + private List listeEnnemie= new ArrayList(); + + public String getType(){ + return "salle"; + } + + public int getPositionX() { + return this.positionX; + } + + public int getPositionY() { + return this.positionY; + } + + public boolean estSortie() { + return sortie; + } + + public boolean estVide() { + return listeEnnemie.isEmpty(); + } +} + diff --git a/JAVA/PROJET-PMT_STRI1A/src/modeles/sauvegarde.java b/JAVA/PROJET-PMT_STRI1A/src/modeles/sauvegarde.java index cc1d9da..4e3b248 100644 --- a/JAVA/PROJET-PMT_STRI1A/src/modeles/sauvegarde.java +++ b/JAVA/PROJET-PMT_STRI1A/src/modeles/sauvegarde.java @@ -13,12 +13,12 @@ public class sauvegarde { f.createNewFile(); FileWriter fw= new FileWriter(f,true); for (int i =0; i