Compare commits

..

9 Commits

@ -1,20 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry exported="true" kind="lib" path="/home/nicolas/Bureau/jdbc-support-1.0.23-sources.jar">
<attributes>
<attribute name="module" value="true"/>
</attributes>
</classpathentry>
<classpathentry exported="true" kind="lib" path="/home/nicolas/Téléchargements/gson-2.8.5.jar">
<attributes>
<attribute name="module" value="true"/>
</attributes>
</classpathentry>
<classpathentry exported="true" kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
<attributes>
<attribute name="module" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="bin"/>
</classpath>

@ -1,17 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>PROJET-PMT_STRI1A</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>

@ -1,12 +0,0 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.release=enabled
org.eclipse.jdt.core.compiler.source=11

File diff suppressed because one or more lines are too long

@ -1,33 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry excluding="src/" kind="src" path=""/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
<attributes>
<attribute name="module" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="/home/nicolas/Bureau/jdbc-support-1.0.23-sources.jar">
<attributes>
<attribute name="module" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.USER_LIBRARY/gson">
<attributes>
<attribute name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY" value="/home/nicolas/Téléchargements"/>
<attribute name="module" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/5">
<attributes>
<attribute name="module" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="/home/nicolas/Téléchargements/gson-2.8.5.jar">
<attributes>
<attribute name="module" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="/home/nicolas/Bureau/java-json.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>

@ -1,12 +0,0 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=11
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=11
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.release=enabled
org.eclipse.jdt.core.compiler.source=11

@ -1,79 +0,0 @@
!SESSION 2019-05-05 11:22:39.686 -----------------------------------------------
eclipse.buildId=4.10.0.I20181206-0815
java.version=11.0.2
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=fr_FR
Framework arguments: -product org.eclipse.epp.package.java.product
Command-line arguments: -data /home/nicolas/Bureau/PROJET-PMT_STRI1A/JAVA/PROJET-PMT_STRI1A/src/json -os linux -ws gtk -arch x86_64 -product org.eclipse.epp.package.java.product
!ENTRY org.eclipse.mylyn.bugzilla.core 4 0 2019-05-05 11:22:40.315
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Could not resolve module: org.eclipse.mylyn.bugzilla.core [262]
Unresolved requirement: Require-Bundle: org.apache.xmlrpc
-> Bundle-SymbolicName: org.apache.xmlrpc; bundle-version="3.0.0.v20100427-1100"
org.apache.xmlrpc [54]
Unresolved requirement: Import-Package: javax.xml.bind
Unresolved requirement: Require-Bundle: org.eclipse.mylyn.commons.xmlrpc; bundle-version="[3.8.0,4.0.0)"
-> Bundle-SymbolicName: org.eclipse.mylyn.commons.xmlrpc; bundle-version="3.24.2.v20180904-2231"; singleton:="true"
org.eclipse.mylyn.commons.xmlrpc [279]
Unresolved requirement: Require-Bundle: org.apache.xmlrpc; bundle-version="[3.0.0,4.0.0)"
-> Bundle-SymbolicName: org.apache.xmlrpc; bundle-version="3.0.0.v20100427-1100"
at org.eclipse.osgi.container.Module.start(Module.java:451)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1783)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1762)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1725)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1656)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:233)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:343)
!ENTRY org.eclipse.mylyn.bugzilla.ui 4 0 2019-05-05 11:22:40.320
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Could not resolve module: org.eclipse.mylyn.bugzilla.ui [264]
Unresolved requirement: Require-Bundle: org.eclipse.mylyn.bugzilla.core; bundle-version="[3.8.0,4.0.0)"
-> Bundle-SymbolicName: org.eclipse.mylyn.bugzilla.core; bundle-version="3.24.2.v20180905-0003"; singleton:="true"
org.eclipse.mylyn.bugzilla.core [262]
Unresolved requirement: Require-Bundle: org.apache.xmlrpc
-> Bundle-SymbolicName: org.apache.xmlrpc; bundle-version="3.0.0.v20100427-1100"
org.apache.xmlrpc [54]
Unresolved requirement: Import-Package: javax.xml.bind
Unresolved requirement: Require-Bundle: org.eclipse.mylyn.commons.xmlrpc; bundle-version="[3.8.0,4.0.0)"
-> Bundle-SymbolicName: org.eclipse.mylyn.commons.xmlrpc; bundle-version="3.24.2.v20180904-2231"; singleton:="true"
org.eclipse.mylyn.commons.xmlrpc [279]
Unresolved requirement: Require-Bundle: org.apache.xmlrpc; bundle-version="[3.0.0,4.0.0)"
-> Bundle-SymbolicName: org.apache.xmlrpc; bundle-version="3.0.0.v20100427-1100"
at org.eclipse.osgi.container.Module.start(Module.java:451)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1783)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1762)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1725)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1656)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:233)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:343)
!ENTRY org.eclipse.mylyn.commons.xmlrpc 4 0 2019-05-05 11:22:40.325
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Could not resolve module: org.eclipse.mylyn.commons.xmlrpc [279]
Unresolved requirement: Require-Bundle: org.apache.xmlrpc; bundle-version="[3.0.0,4.0.0)"
-> Bundle-SymbolicName: org.apache.xmlrpc; bundle-version="3.0.0.v20100427-1100"
org.apache.xmlrpc [54]
Unresolved requirement: Import-Package: javax.xml.bind
at org.eclipse.osgi.container.Module.start(Module.java:451)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1783)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1762)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1725)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1656)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:233)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:343)
!ENTRY org.eclipse.mylyn.tasks.core 4 0 2019-05-05 11:22:43.007
!MESSAGE Unexpected error while loading repository template extensions
!SUBENTRY 1 org.eclipse.mylyn.tasks.core 4 0 2019-05-05 11:22:43.007
!MESSAGE Could not load repository template extension contributed by 'org.eclipse.mylyn.bugzilla.ide' with connectorKind 'bugzilla'

@ -1,12 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<section name="Workbench">
<section name="org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart">
<item value="2" key="layout"/>
<item value="true" key="group_libraries"/>
<item value="&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;&#x0A;&lt;packageExplorer group_libraries=&quot;1&quot; layout=&quot;2&quot; linkWithEditor=&quot;0&quot; rootMode=&quot;1&quot; workingSetName=&quot;Aggregate for window 1557048163961&quot;&gt;&#x0A;&lt;customFilters userDefinedPatternsEnabled=&quot;false&quot;&gt;&#x0A;&lt;xmlDefinedFilters&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.StaticsFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.buildship.ui.packageexplorer.filter.gradle.buildfolder&quot; isEnabled=&quot;true&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.mylyn.java.ui.MembersFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.NonJavaProjectsFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer_patternFilterId_.*&quot; isEnabled=&quot;true&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.NonSharedProjectsFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.SyntheticMembersFilter&quot; isEnabled=&quot;true&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.ContainedLibraryFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.internal.ui.PackageExplorer.HideInnerClassFilesFilter&quot; isEnabled=&quot;true&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.internal.ui.PackageExplorer.EmptyInnerPackageFilter&quot; isEnabled=&quot;true&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.m2e.MavenModuleFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.buildship.ui.packageexplorer.filter.gradle.subProject&quot; isEnabled=&quot;true&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.ClosedProjectsFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.DeprecatedMembersFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.EmptyLibraryContainerFilter&quot; isEnabled=&quot;true&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.PackageDeclarationFilter&quot; isEnabled=&quot;true&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.ImportDeclarationFilter&quot; isEnabled=&quot;true&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.NonJavaElementFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.LibraryFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.CuAndClassFileFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.internal.ui.PackageExplorer.EmptyPackageFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.NonPublicFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.LocalTypesFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;child filterId=&quot;org.eclipse.jdt.ui.PackageExplorer.FieldsFilter&quot; isEnabled=&quot;false&quot;/&gt;&#x0A;&lt;/xmlDefinedFilters&gt;&#x0A;&lt;/customFilters&gt;&#x0A;&lt;/packageExplorer&gt;" key="memento"/>
<item value="1" key="rootMode"/>
<item value="false" key="linkWithEditor"/>
</section>
<section name="JavaElementSearchActions">
</section>
</section>

@ -1 +0,0 @@
2019-05-05 11:22:44,020 [Worker-1: Loading available Gradle versions] INFO o.e.b.c.i.u.g.PublishedGradleVersions - Gradle version information cache is up-to-date. Trying to read.

@ -1,11 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<section name="Workbench">
<section name="WORKBENCH_SETTINGS">
<list key="ENABLED_TRANSFERS">
</list>
</section>
<section name="ChooseWorkspaceDialogSettings">
<item value="185" key="DIALOG_X_ORIGIN"/>
<item value="114" key="DIALOG_Y_ORIGIN"/>
</section>
</section>

@ -1,15 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<section name="Workbench">
<section name="org.eclipse.ui.internal.QuickAccess">
<item value="-1" key="dialogHeight"/>
<item value="-1" key="dialogWidth"/>
<list key="textEntries">
</list>
<list key="orderedElements">
</list>
<list key="orderedProviders">
</list>
<list key="textArray">
</list>
</section>
</section>

@ -1,3 +0,0 @@
#Sun May 05 11:22:40 CEST 2019
org.eclipse.core.runtime=2
org.eclipse.platform=4.10.0.v20181206-0815

@ -1,30 +0,0 @@
package json;
import modeles.Salle;
import com.google.gson.Gson;
public class gsonGenerator {
String chaineJson;
/**
* @param chaineJson
*/
public gsonGenerator() {
}
/*chaine json =
"{'positionX':0,
'positionY':0,
'sortie':false,
'monstre':[{'nom':premier monstre,'pAttaque':5}],
'porte':[{'ouvert':=true, 'position':"H"}]}"
*/
public Salle generate(String chaine) {
Gson gson = new Gson();
Salle salle = gson.fromJson(chaine, Salle.class);
System.out.println(salle.estVide());
return salle;
}
}

@ -1,49 +0,0 @@
{
"listePersonnage":[
{
"nom":"test",
"pVieMax":10,
"pVie":10,
"pAttaque":20,
"arme":null,
"armure":null,
"bourse":null
}
],
"listeSalle":[
{
"positionX":0,
"positionY":0,
"sortie":false,
"listeEnnemie":[{"nom":"premiermonstre",
"pAttaque":5}
],
"listePorte":[{"ouvert":true,
"orientation":"H"}]
}
],
"listeArme":[
{"nom":"arme1",
"prix":10,
"resistance":10,
"pArme":10}],
"listeArmure":[ {"nom":"armure1",
"prix":10,
"resistance":10,
"pArmure":10}],
"listePorte":[
{
"id":1,
"ouvert":false,
"orientation":"Z",
}
],
"listeMonstre":[{"nom":"premiermonstre",
"pAttaque":5}]
}

@ -1,22 +0,0 @@
package json;
import modeles.Arme;
import modeles.Labyrinthe;
import modeles.Monstre;
public class main {
public static void main(String[] args) {
gsonGenerator generateur = new gsonGenerator();
Generateur gene = new Generateur();
Labyrinthe lab = gene.labyrithe();
//lab.getListeSalle();
Monstre monstre =new Monstre("test",5);
Arme arme = new Arme("arme1", 10, 10, 10);
System.out.println("");
}
}

@ -1,60 +0,0 @@
/**
*
*/
package modeles;
import java.util.*;
/**
* @author flavien
*
*/
public class Labyrinthe {
protected List<Personnage> listePersonnage=new ArrayList<Personnage>();
protected List<Arme> listeArme= new ArrayList<Arme>();
protected List<Armure> listeArmure=new ArrayList<Armure>();
protected List<Porte> listePorte=new ArrayList<Porte>();
protected List<Monstre> listeMonstre=new ArrayList<Monstre>();
public void generateLabyrinthe(int nInstance) {
/*switch (nInstance)
case 1 :
return Labyrinthe1();
break;
}*/
labyrinthe1();
}
public void labyrinthe1() {
Arme arme=new Arme("épée en bois",5,10,2);
listeArme.add(arme);
Arme arme1=new Arme("épée en acier",15,10,4);
listeArme.add(arme1);
Arme arme2=new Arme("épée en acier solide",25,20,4);
listeArme.add(arme2);
Arme arme3=new Arme("épée de cristal",30,5,7);
listeArme.add(arme3);
Arme arme4=new Arme("Lame Blanche",200,30,10);
listeArme.add(arme4);
Armure armure1=new Armure("armure de cuir",10,10,5);
listeArmure.add(armure1);
Armure armure=new Armure("armure en papier",5,5,2);
listeArmure.add(armure);
Armure armure2=new Armure("armure de fer",30,10,5);
listeArmure.add(armure2);
Armure armure3=new Armure("Le kevlar",150,15,8);
listeArmure.add(armure3);
Personnage perso=new Personnage("Aramis",10,1,null);
listePersonnage.add(perso);
Personnage perso2=new Personnage("Boromis",8,2,null);
listePersonnage.add(perso2);
Marche marche = new Marche();
}
}

@ -1,19 +0,0 @@
/**
*
*/
package modeles;
import java.util.List;
/**
* @author flavien
*
*/
public class Marche extends Salle {
public Marche(int positionX, int positionY, boolean sortie, List listeEnnemie, List listePorte) {
super(positionX, positionY, sortie, listeEnnemie, listePorte);
// TODO Auto-generated constructor stub
}
}

@ -1,56 +0,0 @@
/**
*
*/
package modeles;
/**
* @author nicolas
*
*/
public class Menu {
public String menuCombat(Monstre mons, Personnage perso) {
int degat;
int reponse = 0;
System.out.println("Un monstre du nom de "+mons.getNom()+" se présente devant vous et il est très en colère :");
while (true){
System.out.println("\t - 1° attaquer\n\t - 2° Potion \n\t- 3° Fuir");
reponse=Clavier.entrerClavierInt();
switch (reponse) {
case 1:
degat = perso.attaquer(mons);
System.out.println("Vous avez infligé "+degat+" à votre adversaire.");
if (!mons.isVivant()) {
perso.salle.cle();
return "Votre ennemie trépasse et vous obtenez la clé des portes de la salle.";
} else {
System.out.println("Au tour de votre adversaire. Il attaque préparez vous ! ");
System.out.println("il vous inflige "+ mons.attaquer(perso)+".");
if (!perso.isVivant()) {
return "C'est ainsi que vous trépassez sous les coups des ténèbres. Reposez vous héros... Vous avez l'éternité.";
}
else System.out.println("votre ennemie n'est pas encore à bout achever le !");
}
break;
case 2 :
if (!perso.getPotion().isEmpty()) {
perso.utiliser(perso.getPotion().remove(0));
System.out.println("Vous avez utilisé une potion. Votre vie est maintenant au maximum.");
} else {
System.out.println("Il ne vous reste plus de potion. Désolé.");
}
break;
case 3 :
System.out.println("Vous tentez de fuir.");
Random rd = new Random();
if (rd.nextInt(100)<50) {
return "Vous avez fuit.";
} else {
System.out.println("Ce fut un échec !");
}
}
}
}s
}

@ -1,85 +0,0 @@
package modeles;
import java.util.ArrayList;
import java.util.List;
public class Personnage extends EtreVivant {
private Arme arme;
private Armure armure;
private Bourse bourse;
private List<Potion> listepotion= new ArrayList<Potion>();
public Personnage(String nom, int pVieMax,int pAttaque, Salle salle) {
super(nom, pVieMax, pAttaque, salle);
}
public void equiper(Arme arme) {
arme.setProprietaire(this);
this.arme=arme;
}
public void equiper(Armure armure) {
armure.setProprietaire(this);
this.armure=armure;
}
public void utiliser(Potion potion) {
soin();
}
public void seDeplacer(Salle salle) {
this.salle=salle;
}
public void allerMarche(Salle marche){
this.salle=marche;
}
public List<Potion> getPotion() {
return this.listepotion;
}
public void gagnerUnePotion() {
Potion potion=new Potion(100);
listepotion.add(potion);
}
public void soin() {
this.pVie=this.pVieMax;
}
public int attaquer(Monstre monstre) {
if(arme!=null) {
monstre.pVie=monstre.pVie-(arme.getpArme()+getpAttaque());
return arme.getpArme()+getpAttaque();
}
else {
monstre.pVie=monstre.pVie=getpAttaque();
return getpAttaque();
}
}
public Bourse getBourse() {
return this.bourse;
}
public void getValeurBourse() {
System.out.println(this.getBourse().getValeur());
}
/* @return the arme
*/
public Arme getArme() {
return arme;
}
/* @return the armure
*/
public Armure getArmure() {
return armure;
}
public void soin(int heal) {
if (pVie+heal > pVieMax)pVie=pVieMax;
else pVie+=heal;
}
}

@ -1,44 +0,0 @@
/**
*
*/
package modeles;
import java.util.ArrayList;
/**
* @author flavien
*
*/
public class Porte {
private int id;
private boolean ouvert;
private Salle salle1;
private Salle salle2;
public Porte() {
}
public Porte(int id,boolean ouvert, Salle salle,Salle salle2) {
super();
this.ouvert = ouvert;
this.salle1 = salle;
this.salle2 = salle2;
this.id=id;
}
public boolean estOuverte() {
return ouvert;
}
public int getId(){
return this.id;
}
/**
* @param ouvert
* @param orientation
*/
}

@ -1,66 +0,0 @@
package modeles;
import java.util.ArrayList;
import java.util.List;
/**
* @author flavien
*
*/
public class Salle {
public static int positionX;
/**
* @param positionX
* @param positionY
* @param sortie
* @param listeEnnemie
* @param listePorte
*/
public Salle(int positionX, int positionY, boolean sortie, List<Integer> listeEnnemie) {
this.positionX=positionX;
this.positionY = positionY;
this.sortie = sortie;
this.listeEnnemie = listeEnnemie;
}
public Salle(int positionX, int positionY, boolean sortie, List<Integer> listeEnnemie, Porte sal) {
this.positionX = positionX;
this.positionY = positionY;
this.sortie = sortie;
this.listeEnnemie = listeEnnemie;
this.listePorte.add(sal.getId());
}
public Salle() {
}
private static int positionY;
private static boolean sortie;
private static List<Integer> listeEnnemie= new ArrayList<Integer>();
private static List<Integer> listePorte = new ArrayList<Integer>();
public String getType(){
return "salle";
}
public int getPositionX() {
return positionX;
}
public int getPositionY() {
return positionY;
}
public boolean estSortie() {
return sortie;
}
public boolean estVide() {
return listeEnnemie.isEmpty();
}
}

@ -1,42 +0,0 @@
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<lab.listePersonnage.size();i++) {
fw.write("{\n\t \"nom\" : \""+lab.listePersonnage.get(i).getNom()+"\" ,"
+ "\n\t \"pVieMax\" : \""+lab.listePersonnage.get(i).getPvMax()
+"\" ,\n\t \"pVie\" : \""+lab.listePersonnage.get(i).getpVie()
+"\" ,\n\t \"pAttaque\" : \""+lab.listePersonnage.get(i).getpAttaque()
//+"\" ,\n\t \"salle\" : \""+lab.listePersonnage.get(i).getSalle().getPositionX()+" "+lab.listePersonnage.get(i).getSalle().getPositionY() /*attention pour la r<>cup<75>ration de sauvegarde*/
+"\" ,\n\t \"vivant\" : \""+lab.listePersonnage.get(i).isVivant() +"\n\t \"arme\" : \""+lab.listePersonnage.get(i).getArme().getNom()
+"\" ,\n\t \"armure\" : \""+lab.listePersonnage.get(i).getArmure().getNom() +"\n\t \"bourse\" : \""+lab.listePersonnage.get(i).getBourse().getValeur()+"\n}"); /* attention pour la r<>cup<75>ration de donn<6E>e */
}
fw.flush();
fw.close();
} catch (IOException ex) {
ex.printStackTrace();
}
}
/*
public void enregistrerLabyrinthe(Labyrinthe lab) { // <20> faire
try {
File f = new File ("./labyrinthe.json");
f.createNewFile();
FileWriter fw= new FileWriter(f,true);
for(int i = 0; i<lab.listeSalle.size();i++) {
fw.write("{\n\t [ \n\t{\n\t ");
}
}
}
*/
}

@ -1,12 +0,0 @@
/**
*
*/
/**
* @author nicolas
*
*/
module projet {
requires gson;
requires java.sql;
opens modeles to gson;
}

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="lib" path="C:/Users/theo/Downloads/Telegram Desktop/gson-2.8.2.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5">
<attributes>
<attribute name="module" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="C:/Users/theo/Downloads/Telegram Desktop/jdbc-api-1.4.jar"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>

@ -0,0 +1,104 @@
!SESSION 2019-05-07 14:13:38.893 -----------------------------------------------
eclipse.buildId=4.11.0.I20190307-0500
java.version=1.8.0_201
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=fr_FR
Framework arguments: -product org.eclipse.epp.package.java.product
Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.java.product
!ENTRY org.eclipse.egit.core 1 0 2019-05-07 14:14:51.214
!MESSAGE Using Apache MINA sshd as ssh client.
!ENTRY org.eclipse.ui 4 0 2019-05-07 14:15:25.587
!MESSAGE Unhandled event loop exception
!STACK 0
org.eclipse.swt.SWTException: Widget is disposed
at org.eclipse.swt.SWT.error(SWT.java:4699)
at org.eclipse.swt.SWT.error(SWT.java:4614)
at org.eclipse.swt.SWT.error(SWT.java:4585)
at org.eclipse.swt.widgets.Widget.error(Widget.java:451)
at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:350)
at org.eclipse.swt.widgets.Composite.getChildren(Composite.java:469)
at org.eclipse.epp.internal.mpc.ui.wizards.MarketplaceDropAdapter.lambda$0(MarketplaceDropAdapter.java:136)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:40)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:185)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3919)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3550)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1173)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1062)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:644)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:566)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:155)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:661)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:597)
at org.eclipse.equinox.launcher.Main.run(Main.java:1476)
!ENTRY org.eclipse.ui 4 0 2019-05-07 14:15:25.598
!MESSAGE Unhandled event loop exception
!STACK 0
org.eclipse.swt.SWTException: Widget is disposed
at org.eclipse.swt.SWT.error(SWT.java:4699)
at org.eclipse.swt.SWT.error(SWT.java:4614)
at org.eclipse.swt.SWT.error(SWT.java:4585)
at org.eclipse.swt.widgets.Widget.error(Widget.java:451)
at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:350)
at org.eclipse.swt.widgets.Composite.getChildren(Composite.java:469)
at org.eclipse.epp.internal.mpc.ui.wizards.MarketplaceDropAdapter.lambda$0(MarketplaceDropAdapter.java:136)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:40)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:185)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3919)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3550)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1173)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1062)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:644)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:566)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:155)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:661)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:597)
at org.eclipse.equinox.launcher.Main.run(Main.java:1476)
!SESSION 2019-05-07 14:17:10.480 -----------------------------------------------
eclipse.buildId=4.11.0.I20190307-0500
java.version=1.8.0_201
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=fr_FR
Framework arguments: -product org.eclipse.epp.package.java.product -product org.eclipse.epp.package.java.product
Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.java.product -data file:/C:/Users/theo/Documents/Java/Projet/javaProject/ -product org.eclipse.epp.package.java.product
!ENTRY org.eclipse.egit.core 1 0 2019-05-07 14:17:13.291
!MESSAGE Using Apache MINA sshd as ssh client.
!SESSION 2019-05-07 14:18:23.681 -----------------------------------------------
eclipse.buildId=4.11.0.I20190307-0500
java.version=1.8.0_201
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=fr_FR
Framework arguments: -product org.eclipse.epp.package.java.product -product org.eclipse.epp.package.java.product -product org.eclipse.epp.package.java.product
Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.java.product -product org.eclipse.epp.package.java.product -data C:\Users\theo\Documents\Java\Projet\javaProject -product org.eclipse.epp.package.java.product
!ENTRY org.eclipse.egit.core 1 0 2019-05-07 14:18:26.153
!MESSAGE Using Apache MINA sshd as ssh client.

@ -0,0 +1,3 @@
eclipse.preferences.version=1
org.eclipse.debug.ui.PREF_LAUNCH_PERSPECTIVES=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?>\r\n<launchPerspectives/>\r\n
preferredTargets=default\:default|

@ -0,0 +1,2 @@
CatalogDescriptor=http\://marketplace.eclipse.org
eclipse.preferences.version=1

@ -0,0 +1,8 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.codeComplete.visibilityCheck=enabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.8

@ -0,0 +1,2 @@
eclipse.preferences.version=1
org.eclipse.jdt.junit.content_assist_favorite_static_members_migrated=true

@ -0,0 +1,2 @@
eclipse.preferences.version=1
org.eclipse.jdt.launching.PREF_VM_XML=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?>\r\n<vmSettings defaultVM\="57,org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType13,1557231542900" defaultVMConnector\="">\r\n<vmType id\="org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType">\r\n<vm id\="1557231542900" name\="jdk-12.0.1" path\="C\:\\Program Files\\Java\\jre1.8.0_211"/>\r\n</vmType>\r\n</vmSettings>\r\n

@ -1,7 +1,8 @@
content_assist_proposals_background=252,252,252 content_assist_number_of_computers=16
content_assist_proposals_foreground=35,38,39 content_assist_proposals_background=255,255,255
content_assist_proposals_foreground=0,0,0
eclipse.preferences.version=1 eclipse.preferences.version=1
org.eclipse.jdt.ui.formatterprofiles.version=15 org.eclipse.jdt.ui.formatterprofiles.version=16
org.eclipse.jdt.ui.text.code_templates_migrated=true org.eclipse.jdt.ui.text.code_templates_migrated=true
org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates/> org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates/>
spelling_locale_initialized=true spelling_locale_initialized=true

@ -0,0 +1,2 @@
eclipse.preferences.version=1
org.eclipse.jsch.core.hasChangedDefaultWin32SshHome=true

@ -0,0 +1,2 @@
eclipse.preferences.version=1
overviewRuler_migration=migrated_3.1

@ -1,5 +1,5 @@
PROBLEMS_FILTERS_MIGRATE=true PROBLEMS_FILTERS_MIGRATE=true
eclipse.preferences.version=1 eclipse.preferences.version=1
platformState=1548420157012 platformState=1557231219850
quickStart=false quickStart=false
tipsAndTricks=true tipsAndTricks=true

@ -0,0 +1,4 @@
content_assist_number_of_computers=3
eclipse.preferences.version=1
useAnnotationsPrefPage=true
useQuickDiffPrefPage=true

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<section name="Workbench">
<section name="org.eclipse.debug.ui.SELECT_LAUNCH_SHORTCUT_DIALOG">
<item key="DIALOG_WIDTH" value="270"/>
<item key="DIALOG_HEIGHT" value="436"/>
<item key="DIALOG_FONT_NAME" value="1|Segoe UI|9.0|0|WINDOWS|1|-12|0|0|0|400|0|0|0|1|0|0|0|0|Segoe UI"/>
</section>
<section name="org.eclipse.debug.ui.LAUNCH_CONFIGURATIONS_DIALOG_SECTION">
<item key="org.eclipse.debug.ui.DIALOG_SASH_WEIGHTS_1" value="237"/>
<item key="org.eclipse.debug.ui.DIALOG_SASH_WEIGHTS_2" value="762"/>
<item key="org.eclipse.debug.ui.EXPANDED_NODES" value=", "/>
<item key="DIALOG_WIDTH" value="800"/>
<item key="DIALOG_HEIGHT" value="640"/>
<item key="DIALOG_FONT_NAME" value="1|Segoe UI|9.0|0|WINDOWS|1|-12|0|0|0|400|0|0|0|1|0|0|0|0|Segoe UI"/>
</section>
</section>

File diff suppressed because one or more lines are too long

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<section name="Workbench">
<section name="org.eclipse.epp.internal.mpc.ui.wizards.MarketplaceWizardDialog_dialogBounds.absolute">
<item key="DIALOG_X_ORIGIN" value="420"/>
<item key="DIALOG_Y_ORIGIN" value="0"/>
<item key="DIALOG_WIDTH" value="526"/>
<item key="DIALOG_HEIGHT" value="728"/>
<item key="DIALOG_FONT_NAME" value="1|Segoe UI|9.0|0|WINDOWS|1|-12|0|0|0|400|0|0|0|1|0|0|0|0|Segoe UI"/>
</section>
</section>

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save