Skip to content
Snippets Groups Projects
Commit 269c23b6 authored by Louis MALTERRE's avatar Louis MALTERRE
Browse files

debut implementation character, entity, monster, coordonnees

parent efcec089
No related branches found
No related tags found
No related merge requests found
Showing
with 143 additions and 3 deletions
# Default ignored files
/shelf/
/workspace.xml
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/acl-project.iml" filepath="$PROJECT_DIR$/.idea/acl-project.iml" />
</modules>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>
\ No newline at end of file
# Default ignored files
/shelf/
/workspace.xml
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<annotationProcessing>
<profile name="Maven default annotation processors profile" enabled="true">
<sourceOutputDir name="target/generated-sources/annotations" />
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
<outputRelativeToContentRoot value="true" />
<module name="MAVENProject" />
</profile>
</annotationProcessing>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding">
<file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/src/main/resources" charset="UTF-8" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RemoteRepositoriesConfiguration">
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Central Repository" />
<option name="url" value="https://repo.maven.apache.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Maven Central repository" />
<option name="url" value="https://repo1.maven.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="jboss.community" />
<option name="name" value="JBoss Community repository" />
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
</remote-repository>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="MavenProjectsManager">
<option name="originalFiles">
<list>
<option value="$PROJECT_DIR$/pom.xml" />
</list>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_19" project-jdk-name="17" project-jdk-type="JavaSDK" />
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
</component>
</project>
\ No newline at end of file
@startuml
title Diagramme UML des Cyberpac 2077
java.awt.event.KeyListener <|-- engine.GameController
engine.GameController <|.. jeu.Controller
engine.Game <|.. jeu.Jeu
......@@ -65,13 +67,13 @@ class entity.Character {
+ void deplacements()
+ void attaque()
+ Coordonnees positions
+ int statVitesse
+ int vmax
}
class entity.Monster{
+ Coordonnees positions
+ void deplacements()
+ void attaque()
+ int statVitesse
+ int vmax
}
......
package entity;
public class Character {
import environnement.Coordonnees;
public class Character extends Entity{
Coordonnees coord;
int vitesseMax; // vitesse max
public Character(Coordonnees c,int vitesseMax){
super(c,vitesseMax);
}
public void deplacements(){
}
public void attaque(){
}
}
package entity;
import environnement.Coordonnees;
public abstract class Entity {
Coordonnees coord;
int vitesseMax;
public Entity(Coordonnees c,int vitesseMax){
this.coord = c;
this.vitesseMax = vitesseMax;
}
public void deplacements(){}
public void attaque(){}
}
package environnement;
import java.lang.ProcessBuilder.Redirect.Type;
import entity.Entity;
public class Coordonnees {
int x;
int z;
public Coordonnees(int x,int z){
this.x = x;
this.z = z;
}
public static int distance(Object o1,Object o2){
if ((o1 instanceof Entity) || (o2 instanceof Entity))return Math.sqrt(Math.pow(o1.coord.x - o2.coord.x, 2) + Math.pow(o1.coord.y - o2.coord.y,2));
}
}
File added
File added
File added
File added
File added
File added
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment