Commit du projet en cours
This commit is contained in:
parent
526d6b679c
commit
a6e059f401
20
JAVA/PROJET-PMT_STRI1A/.classpath
Normal file
20
JAVA/PROJET-PMT_STRI1A/.classpath
Normal file
@ -0,0 +1,20 @@
|
||||
<?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
JAVA/PROJET-PMT_STRI1A/.gitignore
vendored
Normal file
1
JAVA/PROJET-PMT_STRI1A/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
/bin/
|
17
JAVA/PROJET-PMT_STRI1A/.project
Normal file
17
JAVA/PROJET-PMT_STRI1A/.project
Normal file
@ -0,0 +1,17 @@
|
||||
<?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>
|
12
JAVA/PROJET-PMT_STRI1A/.settings/org.eclipse.jdt.core.prefs
Normal file
12
JAVA/PROJET-PMT_STRI1A/.settings/org.eclipse.jdt.core.prefs
Normal file
@ -0,0 +1,12 @@
|
||||
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
BIN
JAVA/PROJET-PMT_STRI1A/src/java-json.jar
Normal file
BIN
JAVA/PROJET-PMT_STRI1A/src/java-json.jar
Normal file
Binary file not shown.
0
JAVA/PROJET-PMT_STRI1A/src/json/.metadata/.lock
Normal file
0
JAVA/PROJET-PMT_STRI1A/src/json/.metadata/.lock
Normal file
79
JAVA/PROJET-PMT_STRI1A/src/json/.metadata/.log
Normal file
79
JAVA/PROJET-PMT_STRI1A/src/json/.metadata/.log
Normal file
@ -0,0 +1,79 @@
|
||||
!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'
|
Binary file not shown.
Binary file not shown.
BIN
JAVA/PROJET-PMT_STRI1A/src/json/.metadata/.mylyn/tasks.xml.zip
Normal file
BIN
JAVA/PROJET-PMT_STRI1A/src/json/.metadata/.mylyn/tasks.xml.zip
Normal file
Binary file not shown.
@ -0,0 +1 @@
|
||||
|
Binary file not shown.
@ -0,0 +1 @@
|
||||
|
Binary file not shown.
Binary file not shown.
@ -0,0 +1,2 @@
|
||||
eclipse.preferences.version=1
|
||||
version=1
|
@ -0,0 +1,9 @@
|
||||
content_assist_proposals_background=252,252,252
|
||||
content_assist_proposals_foreground=35,38,39
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.ui.formatterprofiles.version=15
|
||||
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/>
|
||||
spelling_locale_initialized=true
|
||||
useAnnotationsPrefPage=true
|
||||
useQuickDiffPrefPage=true
|
@ -0,0 +1,2 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.m2e.discovery.pref.projects=
|
@ -0,0 +1,2 @@
|
||||
eclipse.preferences.version=1
|
||||
mylyn.attention.migrated=true
|
@ -0,0 +1,2 @@
|
||||
eclipse.preferences.version=1
|
||||
org.eclipse.mylyn.monitor.activity.tracking.enabled.checked=true
|
@ -0,0 +1,5 @@
|
||||
eclipse.preferences.version=1
|
||||
migrated.task.repositories.secure.store=true
|
||||
org.eclipse.mylyn.tasks.ui.filters.nonmatching=true
|
||||
org.eclipse.mylyn.tasks.ui.filters.nonmatching.encouraged=true
|
||||
org.eclipse.mylyn.tasks.ui.welcome.message=true
|
@ -0,0 +1,5 @@
|
||||
PROBLEMS_FILTERS_MIGRATE=true
|
||||
eclipse.preferences.version=1
|
||||
platformState=1548420157012
|
||||
quickStart=false
|
||||
tipsAndTricks=true
|
@ -0,0 +1,2 @@
|
||||
eclipse.preferences.version=1
|
||||
showIntro=false
|
@ -0,0 +1,3 @@
|
||||
//org.eclipse.ui.commands/state/org.eclipse.ui.navigator.resources.nested.changeProjectPresentation/org.eclipse.ui.commands.radioState=false
|
||||
PLUGINS_NOT_ACTIVATED_ON_STARTUP=;org.eclipse.m2e.discovery;
|
||||
eclipse.preferences.version=1
|
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<typeInfoHistroy/>
|
@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<qualifiedTypeNameHistroy/>
|
@ -0,0 +1,12 @@
|
||||
<?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="<?xml version="1.0" encoding="UTF-8"?>
<packageExplorer group_libraries="1" layout="2" linkWithEditor="0" rootMode="1" workingSetName="Aggregate for window 1557048163961">
<customFilters userDefinedPatternsEnabled="false">
<xmlDefinedFilters>
<child filterId="org.eclipse.jdt.ui.PackageExplorer.StaticsFilter" isEnabled="false"/>
<child filterId="org.eclipse.buildship.ui.packageexplorer.filter.gradle.buildfolder" isEnabled="true"/>
<child filterId="org.eclipse.mylyn.java.ui.MembersFilter" isEnabled="false"/>
<child filterId="org.eclipse.jdt.ui.PackageExplorer.NonJavaProjectsFilter" isEnabled="false"/>
<child filterId="org.eclipse.jdt.ui.PackageExplorer_patternFilterId_.*" isEnabled="true"/>
<child filterId="org.eclipse.jdt.ui.PackageExplorer.NonSharedProjectsFilter" isEnabled="false"/>
<child filterId="org.eclipse.jdt.ui.PackageExplorer.SyntheticMembersFilter" isEnabled="true"/>
<child filterId="org.eclipse.jdt.ui.PackageExplorer.ContainedLibraryFilter" isEnabled="false"/>
<child filterId="org.eclipse.jdt.internal.ui.PackageExplorer.HideInnerClassFilesFilter" isEnabled="true"/>
<child filterId="org.eclipse.jdt.internal.ui.PackageExplorer.EmptyInnerPackageFilter" isEnabled="true"/>
<child filterId="org.eclipse.m2e.MavenModuleFilter" isEnabled="false"/>
<child filterId="org.eclipse.buildship.ui.packageexplorer.filter.gradle.subProject" isEnabled="true"/>
<child filterId="org.eclipse.jdt.ui.PackageExplorer.ClosedProjectsFilter" isEnabled="false"/>
<child filterId="org.eclipse.jdt.ui.PackageExplorer.DeprecatedMembersFilter" isEnabled="false"/>
<child filterId="org.eclipse.jdt.ui.PackageExplorer.EmptyLibraryContainerFilter" isEnabled="true"/>
<child filterId="org.eclipse.jdt.ui.PackageExplorer.PackageDeclarationFilter" isEnabled="true"/>
<child filterId="org.eclipse.jdt.ui.PackageExplorer.ImportDeclarationFilter" isEnabled="true"/>
<child filterId="org.eclipse.jdt.ui.PackageExplorer.NonJavaElementFilter" isEnabled="false"/>
<child filterId="org.eclipse.jdt.ui.PackageExplorer.LibraryFilter" isEnabled="false"/>
<child filterId="org.eclipse.jdt.ui.PackageExplorer.CuAndClassFileFilter" isEnabled="false"/>
<child filterId="org.eclipse.jdt.internal.ui.PackageExplorer.EmptyPackageFilter" isEnabled="false"/>
<child filterId="org.eclipse.jdt.ui.PackageExplorer.NonPublicFilter" isEnabled="false"/>
<child filterId="org.eclipse.jdt.ui.PackageExplorer.LocalTypesFilter" isEnabled="false"/>
<child filterId="org.eclipse.jdt.ui.PackageExplorer.FieldsFilter" isEnabled="false"/>
</xmlDefinedFilters>
</customFilters>
</packageExplorer>" key="memento"/>
|
||||
<item value="1" key="rootMode"/>
|
||||
<item value="false" key="linkWithEditor"/>
|
||||
</section>
|
||||
<section name="JavaElementSearchActions">
|
||||
</section>
|
||||
</section>
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1 @@
|
||||
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.
|
@ -0,0 +1,43 @@
|
||||
<configuration scan="true">
|
||||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
|
||||
<pattern>%date [%thread] %-5level %logger{35} - %msg%n</pattern>
|
||||
</encoder>
|
||||
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
|
||||
<level>OFF</level> <!-- change to DEBUG to mimic '-consolelog' behaviour -->
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<File>${org.eclipse.m2e.log.dir}/0.log</File>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
|
||||
<FileNamePattern>${org.eclipse.m2e.log.dir}/%i.log</FileNamePattern>
|
||||
<MinIndex>1</MinIndex>
|
||||
<MaxIndex>10</MaxIndex>
|
||||
</rollingPolicy>
|
||||
<triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy">
|
||||
<MaxFileSize>100MB</MaxFileSize>
|
||||
</triggeringPolicy>
|
||||
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
|
||||
<pattern>%date [%thread] %-5level %logger{35} - %msg%n</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<appender name="EclipseLog" class="org.eclipse.m2e.logback.appender.EclipseLogAppender">
|
||||
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
|
||||
<level>WARN</level>
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
<appender name="MavenConsoleLog" class="org.eclipse.m2e.logback.appender.MavenConsoleAppender">
|
||||
</appender>
|
||||
|
||||
<root level="INFO">
|
||||
<appender-ref ref="FILE" />
|
||||
<appender-ref ref="STDOUT" />
|
||||
<appender-ref ref="EclipseLog" />
|
||||
<appender-ref ref="MavenConsoleLog" />
|
||||
</root>
|
||||
|
||||
<logger name="com.ning.http.client" level="INFO" />
|
||||
</configuration>
|
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<setup:Workspace
|
||||
xmi:version="2.0"
|
||||
xmlns:xmi="http://www.omg.org/XMI"
|
||||
xmlns:setup="http://www.eclipse.org/oomph/setup/1.0"
|
||||
name="workspace"/>
|
@ -0,0 +1,3 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<section name="Workbench">
|
||||
</section>
|
@ -0,0 +1,11 @@
|
||||
<?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>
|
@ -0,0 +1,2 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<state reopen="false"/>
|
@ -0,0 +1,15 @@
|
||||
<?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>
|
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<workingSetManager>
|
||||
<workingSet editPageId="org.eclipse.jdt.internal.ui.DynamicSourcesWorkingSet" factoryID="org.eclipse.ui.internal.WorkingSetFactory" id="1557048163502_0" label="Java Main Sources" name="Java Main Sources"/>
|
||||
<workingSet editPageId="org.eclipse.jdt.internal.ui.DynamicSourcesWorkingSet" factoryID="org.eclipse.ui.internal.WorkingSetFactory" id="1557048163509_1" label="Java Test Sources" name="Java Test Sources"/>
|
||||
<workingSet aggregate="true" factoryID="org.eclipse.ui.internal.WorkingSetFactory" id="1557048163961_2" label="Window Working Set" name="Aggregate for window 1557048163961"/>
|
||||
</workingSetManager>
|
3
JAVA/PROJET-PMT_STRI1A/src/json/.metadata/version.ini
Normal file
3
JAVA/PROJET-PMT_STRI1A/src/json/.metadata/version.ini
Normal file
@ -0,0 +1,3 @@
|
||||
#Sun May 05 11:22:40 CEST 2019
|
||||
org.eclipse.core.runtime=2
|
||||
org.eclipse.platform=4.10.0.v20181206-0815
|
29
JAVA/PROJET-PMT_STRI1A/src/json/Generateur.java
Normal file
29
JAVA/PROJET-PMT_STRI1A/src/json/Generateur.java
Normal file
@ -0,0 +1,29 @@
|
||||
package json;
|
||||
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.FileReader;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
|
||||
import modeles.*;
|
||||
public class Generateur {
|
||||
|
||||
public Labyrinthe labyrithe() {
|
||||
BufferedReader bfr= null;
|
||||
try {
|
||||
bfr = new BufferedReader(new FileReader("/home/nicolas/workspqce_eclipse/projet/src/json/lab.json"));
|
||||
} catch (FileNotFoundException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
//FileReader file = new FileReader(json);
|
||||
Gson gson = new Gson();
|
||||
//String str="{\"positionX\":0,\"positionY\":0,\"sortie\":false,\"monstre\":[{\"nom\":\"premier monstre\",\"pAttaque\":5}],\"porte\":[{\"ouvert\":true, \"position\":\"H\"}]}";
|
||||
Labyrinthe labyrithe = gson.fromJson(bfr, Labyrinthe.class);
|
||||
return labyrithe;
|
||||
}
|
||||
|
||||
|
||||
}
|
30
JAVA/PROJET-PMT_STRI1A/src/json/gsonGenerator.java
Normal file
30
JAVA/PROJET-PMT_STRI1A/src/json/gsonGenerator.java
Normal file
@ -0,0 +1,30 @@
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
}
|
49
JAVA/PROJET-PMT_STRI1A/src/json/lab.json
Normal file
49
JAVA/PROJET-PMT_STRI1A/src/json/lab.json
Normal file
@ -0,0 +1,49 @@
|
||||
|
||||
{
|
||||
"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}]
|
||||
}
|
22
JAVA/PROJET-PMT_STRI1A/src/json/main.java
Normal file
22
JAVA/PROJET-PMT_STRI1A/src/json/main.java
Normal file
@ -0,0 +1,22 @@
|
||||
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("");
|
||||
|
||||
}
|
||||
|
||||
}
|
28
JAVA/PROJET-PMT_STRI1A/src/modeles/Arme.java
Normal file
28
JAVA/PROJET-PMT_STRI1A/src/modeles/Arme.java
Normal file
@ -0,0 +1,28 @@
|
||||
|
||||
package modeles;
|
||||
|
||||
/**
|
||||
* @author flavien
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
public class Arme extends Objet {
|
||||
|
||||
private int pArme;
|
||||
|
||||
public int getpArme() {
|
||||
return this.pArme;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return "Arme";
|
||||
}
|
||||
public Arme(){}
|
||||
public Arme(String nm, int valeur, int resistance, int attaque) {
|
||||
super(nm, valeur, resistance);
|
||||
this.pArme=attaque;
|
||||
}
|
||||
|
||||
/* public void effectArme ? (poison, incin<69>ration, gel, saignement, paralysie,... */
|
||||
}
|
29
JAVA/PROJET-PMT_STRI1A/src/modeles/Armure.java
Normal file
29
JAVA/PROJET-PMT_STRI1A/src/modeles/Armure.java
Normal file
@ -0,0 +1,29 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package modeles;
|
||||
|
||||
/**
|
||||
* @author flavien
|
||||
*
|
||||
*/
|
||||
public class Armure extends Objet {
|
||||
|
||||
private int pArmure;
|
||||
|
||||
public int getpArmure() {
|
||||
return this.pArmure;
|
||||
}
|
||||
|
||||
public String getType () {
|
||||
return "Armure";
|
||||
}
|
||||
public Armure(){}
|
||||
public Armure(String nm, int valeur, int resistance,int efficacite) {
|
||||
super(nm, valeur, resistance);
|
||||
this.pArmure=efficacite;
|
||||
}
|
||||
|
||||
|
||||
/* public armureEffect(...) */
|
||||
}
|
40
JAVA/PROJET-PMT_STRI1A/src/modeles/Bourse.java
Normal file
40
JAVA/PROJET-PMT_STRI1A/src/modeles/Bourse.java
Normal file
@ -0,0 +1,40 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package modeles;
|
||||
|
||||
/**
|
||||
* @author flavien
|
||||
*
|
||||
*/
|
||||
public class Bourse extends Objet {
|
||||
private int valeur;
|
||||
|
||||
public Bourse(int somme) {
|
||||
super("bourse",somme,99999999);
|
||||
|
||||
}
|
||||
|
||||
public int getValeur() {
|
||||
return this.valeur;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return "Bourse";
|
||||
}
|
||||
|
||||
public int Achat(int cout) { //commande pour vérifier si la personne peut acheter un objet et pour faire le décompte de la thunasse
|
||||
if (cout <= this.valeur) return (this.valeur=this.valeur-cout);
|
||||
else {
|
||||
int manque = cout-this.valeur;
|
||||
System.out.println("L'achat est impossible, il vous manque : "+manque);
|
||||
return manque;
|
||||
}
|
||||
}
|
||||
|
||||
public int fusionBourse(Bourse sacPiece) {
|
||||
this.valeur += sacPiece.valeur;
|
||||
return this.valeur;
|
||||
}
|
||||
|
||||
}
|
40
JAVA/PROJET-PMT_STRI1A/src/modeles/Clavier.java
Normal file
40
JAVA/PROJET-PMT_STRI1A/src/modeles/Clavier.java
Normal file
@ -0,0 +1,40 @@
|
||||
package modeles;
|
||||
|
||||
import java.util.InputMismatchException;
|
||||
import java.util.Scanner;
|
||||
|
||||
public class Clavier {
|
||||
private static Scanner scanner = new Scanner(System.in);
|
||||
|
||||
public static String entrerClavierString() {
|
||||
String chaine="";
|
||||
|
||||
try {
|
||||
chaine = scanner.next();
|
||||
} catch (InputMismatchException e) {
|
||||
System.out.println("La valeur lu au clavier n'est pas une chaine");
|
||||
}
|
||||
return chaine;
|
||||
}
|
||||
|
||||
public static int entrerClavierInt() {
|
||||
int entier=0;
|
||||
try {
|
||||
entier = scanner.nextInt();
|
||||
} catch (InputMismatchException e) {
|
||||
System.out.println("La valeur lu au clavier n'est pas un entier");
|
||||
}
|
||||
return entier;
|
||||
}
|
||||
|
||||
public static boolean entrerClavierBoolean() {
|
||||
boolean bool=true;
|
||||
try {
|
||||
bool = scanner.nextBoolean();
|
||||
} catch (InputMismatchException e) {
|
||||
System.out.println("La valeur lu au clavier n'est pas un bool<6F>en");
|
||||
}
|
||||
return bool;
|
||||
}
|
||||
|
||||
}
|
112
JAVA/PROJET-PMT_STRI1A/src/modeles/EtreVivant.java
Normal file
112
JAVA/PROJET-PMT_STRI1A/src/modeles/EtreVivant.java
Normal file
@ -0,0 +1,112 @@
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package modeles;
|
||||
|
||||
/**
|
||||
* @author Nicolas
|
||||
*
|
||||
*/
|
||||
public class EtreVivant {
|
||||
|
||||
private String nom;
|
||||
protected int pVieMax;
|
||||
protected int pVie;
|
||||
private int pAttaque;
|
||||
protected Salle salle;
|
||||
private boolean vivant;
|
||||
/**
|
||||
* @param nom
|
||||
* @param pVieMax
|
||||
* @param pVie
|
||||
* @param pAttaque
|
||||
* @param salle
|
||||
* @param vivant
|
||||
*/
|
||||
public EtreVivant() {
|
||||
|
||||
}
|
||||
public EtreVivant(String nom, int pVieMax, int pAttaque,Salle salle) {
|
||||
super();
|
||||
this.nom = nom;
|
||||
this.pVieMax = pVieMax;
|
||||
this.pVie = pVieMax;
|
||||
this.pAttaque = pAttaque;
|
||||
this.salle=salle;
|
||||
this.vivant = true;
|
||||
}
|
||||
/**
|
||||
* @return the nom
|
||||
*/
|
||||
public String getNom() {
|
||||
return nom;
|
||||
}
|
||||
/**
|
||||
* @param nom the nom to set
|
||||
*/
|
||||
/**
|
||||
* @return the pVieMax
|
||||
*/
|
||||
public int getpVieMax() {
|
||||
return pVieMax;
|
||||
}
|
||||
/**
|
||||
* @param pVieMax the pVieMax to set
|
||||
*/
|
||||
public void setpVieMax(int pVieMax) {
|
||||
this.pVieMax = pVieMax;
|
||||
}
|
||||
/**
|
||||
* @return the pVie
|
||||
*/
|
||||
public int getpVie() {
|
||||
return pVie;
|
||||
}
|
||||
/**
|
||||
* @param pVie the pVie to set
|
||||
*/
|
||||
public void setpVie(int pVie) {
|
||||
this.pVie = pVie;
|
||||
}
|
||||
/**
|
||||
* @return the pAttaque
|
||||
*/
|
||||
public int getpAttaque() {
|
||||
return pAttaque;
|
||||
}
|
||||
/**
|
||||
* @param pAttaque the pAttaque to set
|
||||
*/
|
||||
public void setpAttaque(int pAttaque) {
|
||||
this.pAttaque = pAttaque;
|
||||
}
|
||||
/**
|
||||
* @return the salle
|
||||
|
||||
public Salle getSalle() {
|
||||
return salle;
|
||||
}
|
||||
|
||||
public void setSalle(Salle salle) {
|
||||
this.salle = salle;
|
||||
}
|
||||
*/
|
||||
/**
|
||||
* @return the vivant
|
||||
*/
|
||||
public boolean isVivant() {
|
||||
return vivant;
|
||||
}
|
||||
/**
|
||||
* @param vivant the vivant to set
|
||||
*/
|
||||
public void setVivant(boolean vivant) {
|
||||
this.vivant = vivant;
|
||||
}
|
||||
|
||||
public int getPvMax() {
|
||||
return this.pVieMax;
|
||||
}
|
||||
|
||||
}
|
60
JAVA/PROJET-PMT_STRI1A/src/modeles/Labyrinthe.java
Normal file
60
JAVA/PROJET-PMT_STRI1A/src/modeles/Labyrinthe.java
Normal file
@ -0,0 +1,60 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
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();
|
||||
|
||||
}
|
||||
|
||||
}
|
19
JAVA/PROJET-PMT_STRI1A/src/modeles/Marche.java
Normal file
19
JAVA/PROJET-PMT_STRI1A/src/modeles/Marche.java
Normal file
@ -0,0 +1,19 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
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
|
||||
}
|
||||
|
||||
}
|
56
JAVA/PROJET-PMT_STRI1A/src/modeles/Menu.java
Normal file
56
JAVA/PROJET-PMT_STRI1A/src/modeles/Menu.java
Normal file
@ -0,0 +1,56 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
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
|
||||
}
|
35
JAVA/PROJET-PMT_STRI1A/src/modeles/Monstre.java
Normal file
35
JAVA/PROJET-PMT_STRI1A/src/modeles/Monstre.java
Normal file
@ -0,0 +1,35 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package modeles;
|
||||
|
||||
/**
|
||||
* @author Nicolas
|
||||
*
|
||||
*/
|
||||
public class Monstre extends EtreVivant {
|
||||
|
||||
/**
|
||||
* @param arme
|
||||
* @param armure
|
||||
* @param bourse
|
||||
*/
|
||||
public Monstre(String nom, int pAttaque) {
|
||||
super(nom, 5, pAttaque);
|
||||
|
||||
}
|
||||
public Monstre() {
|
||||
|
||||
}
|
||||
/*
|
||||
public int attaquer(Personnage def) {
|
||||
int pAttaqueLoc;
|
||||
pAttaqueLoc=this.getpAttaque()-(def.getArmure().getpArmure());
|
||||
def.pVie=pAttaqueLoc;
|
||||
return pAttaqueLoc;
|
||||
|
||||
}*/
|
||||
|
||||
|
||||
|
||||
}
|
50
JAVA/PROJET-PMT_STRI1A/src/modeles/Objet.java
Normal file
50
JAVA/PROJET-PMT_STRI1A/src/modeles/Objet.java
Normal file
@ -0,0 +1,50 @@
|
||||
package modeles;
|
||||
|
||||
/**
|
||||
* @author flavien
|
||||
*
|
||||
*/
|
||||
public abstract class Objet {
|
||||
private String nom;
|
||||
private int prix;
|
||||
private int usure;
|
||||
private Personnage proprietaire;
|
||||
|
||||
public Objet() {}
|
||||
public Objet(String nm, int valeur, int resistance) {
|
||||
this.nom=nm;
|
||||
this.prix=valeur;
|
||||
this.usure=resistance;
|
||||
}
|
||||
|
||||
public int getPrix() {
|
||||
return this.prix;
|
||||
}
|
||||
|
||||
public String getNom() {
|
||||
return this.nom;
|
||||
}
|
||||
|
||||
public int getUsure() {
|
||||
return this.usure;
|
||||
}
|
||||
|
||||
public void utilisation() { // diminue la r<EFBFBD>sistance de l'objet
|
||||
this.usure--;
|
||||
if (this.usure == 0) System.out.println(this.nom+"s'est cass<73>e !");
|
||||
}
|
||||
|
||||
public abstract String getType();
|
||||
|
||||
public Personnage getProprietaire() {
|
||||
return this.proprietaire;
|
||||
}
|
||||
|
||||
public void setProprietaire(Personnage perso) {
|
||||
this.proprietaire=perso;
|
||||
}
|
||||
|
||||
public void lacher() {
|
||||
this.proprietaire=null;
|
||||
}
|
||||
}
|
85
JAVA/PROJET-PMT_STRI1A/src/modeles/Personnage.java
Normal file
85
JAVA/PROJET-PMT_STRI1A/src/modeles/Personnage.java
Normal file
@ -0,0 +1,85 @@
|
||||
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;
|
||||
}
|
||||
}
|
44
JAVA/PROJET-PMT_STRI1A/src/modeles/Porte.java
Normal file
44
JAVA/PROJET-PMT_STRI1A/src/modeles/Porte.java
Normal file
@ -0,0 +1,44 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
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
|
||||
*/
|
||||
|
||||
|
||||
}
|
25
JAVA/PROJET-PMT_STRI1A/src/modeles/Potion.java
Normal file
25
JAVA/PROJET-PMT_STRI1A/src/modeles/Potion.java
Normal file
@ -0,0 +1,25 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
package modeles;
|
||||
|
||||
/**
|
||||
* @author flavien
|
||||
*
|
||||
*/
|
||||
public class Potion extends Objet {
|
||||
public String getType() {
|
||||
return "Potion";
|
||||
}
|
||||
|
||||
public Potion(int valeur) {
|
||||
super("potion", valeur, 1);
|
||||
}
|
||||
|
||||
public void utilisation() {
|
||||
super.utilisation();
|
||||
this.getProprietaire().soin(this.getProprietaire().getpVieMax());
|
||||
}
|
||||
|
||||
|
||||
}
|
66
JAVA/PROJET-PMT_STRI1A/src/modeles/Salle.java
Normal file
66
JAVA/PROJET-PMT_STRI1A/src/modeles/Salle.java
Normal file
@ -0,0 +1,66 @@
|
||||
|
||||
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();
|
||||
}
|
||||
|
||||
}
|
||||
|
42
JAVA/PROJET-PMT_STRI1A/src/modeles/sauvegarde.java
Normal file
42
JAVA/PROJET-PMT_STRI1A/src/modeles/sauvegarde.java
Normal file
@ -0,0 +1,42 @@
|
||||
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) { // <EFBFBD> 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 ");
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
12
JAVA/PROJET-PMT_STRI1A/src/module-info.java
Normal file
12
JAVA/PROJET-PMT_STRI1A/src/module-info.java
Normal file
@ -0,0 +1,12 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* @author nicolas
|
||||
*
|
||||
*/
|
||||
module projet {
|
||||
requires gson;
|
||||
requires java.sql;
|
||||
opens modeles to gson;
|
||||
}
|
9
JAVA/PROJET-PMT_STRI1A/src/test/Test.java
Normal file
9
JAVA/PROJET-PMT_STRI1A/src/test/Test.java
Normal file
@ -0,0 +1,9 @@
|
||||
package test;
|
||||
|
||||
/**
|
||||
* @author flavien
|
||||
*
|
||||
*/
|
||||
public class Test {
|
||||
|
||||
}
|
BIN
UML/PMT.vpp
Normal file
BIN
UML/PMT.vpp
Normal file
Binary file not shown.
BIN
UML/PMT.vpp.bak_000f
Normal file
BIN
UML/PMT.vpp.bak_000f
Normal file
Binary file not shown.
BIN
UML/PMT.vpp.bak_001d
Normal file
BIN
UML/PMT.vpp.bak_001d
Normal file
Binary file not shown.
BIN
UML/PMT.vpp.bak_002d
Normal file
BIN
UML/PMT.vpp.bak_002d
Normal file
Binary file not shown.
BIN
UML/PMT.vpp.bak_003d
Normal file
BIN
UML/PMT.vpp.bak_003d
Normal file
Binary file not shown.
BIN
UML/PMT.vpp.bak_004d
Normal file
BIN
UML/PMT.vpp.bak_004d
Normal file
Binary file not shown.
BIN
UML/PMT.vpp.bak_005d
Normal file
BIN
UML/PMT.vpp.bak_005d
Normal file
Binary file not shown.
BIN
UML/PMT.vpp.bak_006d
Normal file
BIN
UML/PMT.vpp.bak_006d
Normal file
Binary file not shown.
BIN
UML/PMT.vpp.bak_007d
Normal file
BIN
UML/PMT.vpp.bak_007d
Normal file
Binary file not shown.
BIN
UML/PMT.vpp.bak_008d
Normal file
BIN
UML/PMT.vpp.bak_008d
Normal file
Binary file not shown.
BIN
UML/PMT.vpp.bak_009d
Normal file
BIN
UML/PMT.vpp.bak_009d
Normal file
Binary file not shown.
BIN
projetPMT.pdf
Normal file
BIN
projetPMT.pdf
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user