diff --git a/code/out/production/code/fxml/GameConfigurationMenu.fxml b/code/out/production/code/fxml/GameConfigurationMenu.fxml
new file mode 100644
index 0000000..c821e00
--- /dev/null
+++ b/code/out/production/code/fxml/GameConfigurationMenu.fxml
@@ -0,0 +1,90 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/code/out/production/code/fxml/PageGame.fxml b/code/out/production/code/fxml/PageGame.fxml
new file mode 100644
index 0000000..f2a200d
--- /dev/null
+++ b/code/out/production/code/fxml/PageGame.fxml
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/code/out/production/code/image/personnage/viewJeu1.fxml b/code/out/production/code/fxml/viewJeu1.fxml
similarity index 100%
rename from code/out/production/code/image/personnage/viewJeu1.fxml
rename to code/out/production/code/fxml/viewJeu1.fxml
diff --git a/code/out/production/code/image/difficulty.jpg b/code/out/production/code/image/difficulty.jpg
new file mode 100644
index 0000000..743c846
Binary files /dev/null and b/code/out/production/code/image/difficulty.jpg differ
diff --git a/code/out/production/code/image/personnage/Perso1.png b/code/out/production/code/image/personnage/Perso1.png
new file mode 100644
index 0000000..cce8c50
Binary files /dev/null and b/code/out/production/code/image/personnage/Perso1.png differ
diff --git a/code/ressources/fxml/PageGame.fxml b/code/ressources/fxml/PageGame.fxml
new file mode 100644
index 0000000..f2a200d
--- /dev/null
+++ b/code/ressources/fxml/PageGame.fxml
@@ -0,0 +1,40 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/code/ressources/image/personnage/viewJeu1.fxml b/code/ressources/fxml/viewJeu1.fxml
similarity index 100%
rename from code/ressources/image/personnage/viewJeu1.fxml
rename to code/ressources/fxml/viewJeu1.fxml
diff --git a/code/src/launcher/Main.java b/code/src/launcher/Main.java
index 809473e..72f2da5 100644
--- a/code/src/launcher/Main.java
+++ b/code/src/launcher/Main.java
@@ -6,10 +6,8 @@ import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.media.MediaPlayer;
import javafx.stage.Stage;
-import model.Album;
-import model.Database;
+import model.*;
import javafx.scene.media.Media;
-import model.Musique;
import java.io.File;
@@ -22,16 +20,21 @@ import java.util.Objects;
public class Main extends Application {
private static Database currentd;
+ @Override
+ public void stop(){
+ System.out.println("Stopping");
+
+ }
@Override
public void start(Stage primaryStage) throws Exception {
- Parent root = FXMLLoader.load(Objects.requireNonNull(getClass().getResource("/fxml/GameConfigurationMenu.fxml")));
+ Parent root = FXMLLoader.load(Objects.requireNonNull(getClass().getResource("/fxml/PageGame.fxml")));
primaryStage.setTitle("Hello World");
primaryStage.setScene(new Scene(root, 900, 600));
primaryStage.setResizable(false);
primaryStage.show();
- //String pathmusique ="/musique/medieval_musique1.mp3";
+ //début musique
ArrayList musiqueListe = new ArrayList();
Musique song1 = new Musique("/musique/medieval_musique1.mp3",211000);
Musique song2 = new Musique("/musique/medieval_musique2.mp3",248000);
@@ -43,6 +46,27 @@ public class Main extends Application {
song.addList(song3);
song.addList(song4);
song.play();
+ //fin musique
+ //début map
+ //Map map = new Map(30,5,5,20,20);
+ Map map = new Map(32,30);
+ Case case1 = new Case(1,2,2, true, false,map);
+ Case case2 = new Case(2,3,2, false, false,map);
+ Case case3 = new Case(3,4,2, false, false,map);
+ Case case4 = new Case(4,5,2, false, false,map);
+ map.addCase(case1);
+ map.addCase(case2);
+ map.addCase(case3);
+ map.addCase(case4);
+ Avatar avatar1 = new Avatar(1, "/image/personnage/Person1.2.png");
+ avatar1.setCoord(map.getCoordStartX(), map.getCoordStartY());
+ //fin map
+
+
+
+
+
+ //fin map
}
diff --git a/code/src/model/Avatar.java b/code/src/model/Avatar.java
new file mode 100644
index 0000000..42fca05
--- /dev/null
+++ b/code/src/model/Avatar.java
@@ -0,0 +1,57 @@
+package model;
+
+public class Avatar {
+ int idAvatar;
+ String image;
+ int coordX;
+ int coordY;
+
+ public Avatar(int idAvatar, String image, int coordX, int coordY) {
+ this.idAvatar = idAvatar;
+ this.image = image;
+ this.coordX = coordX;
+ this.coordY = coordY;
+ }
+
+ public Avatar(int idAvatar, String image) {
+ this.idAvatar = idAvatar;
+ this.image = image;
+ }
+
+ public int getIdAvatar() {
+ return idAvatar;
+ }
+
+ public String getImage() {
+ return image;
+ }
+
+ public int getCoordX() {
+ return coordX;
+ }
+
+ public int getCoordY() {
+ return coordY;
+ }
+
+ public void setIdAvatar(int idAvatar) {
+ this.idAvatar = idAvatar;
+ }
+
+ public void setImage(String image) {
+ this.image = image;
+ }
+
+ public void setCoordX(int coordX) {
+ this.coordX = coordX;
+ }
+
+ public void setCoordY(int coordY) {
+ this.coordY = coordY;
+ }
+
+ public void setCoord(int coordX, int coordY){
+ this.coordX = coordX;
+ this.coordY = coordY;
+ }
+}
diff --git a/code/src/model/Case.java b/code/src/model/Case.java
new file mode 100644
index 0000000..4102843
--- /dev/null
+++ b/code/src/model/Case.java
@@ -0,0 +1,59 @@
+package model;
+
+public class Case {
+ int idCase;
+ int coordX;
+ int coordY;
+ boolean isStart;
+ boolean isEnd;
+ int sizeTile;
+
+ public Case(int idCase, int coordX, int coordY, boolean isStart, boolean isEnd, Map map) {
+ this.sizeTile = map.getSizeTile();
+ this.idCase = idCase;
+ this.coordX = coordX*sizeTile;
+ this.coordY = coordY*sizeTile;
+ this.isStart = isStart;
+ this.isEnd = isEnd;
+ }
+
+ public int getIdCase() {
+ return idCase;
+ }
+
+ public int getCoordX() {
+ return coordX;
+ }
+
+ public int getCoordY() {
+ return coordY;
+ }
+
+ public boolean isStart() {
+ return isStart;
+ }
+
+ public boolean isEnd() {
+ return isEnd;
+ }
+
+ public void setIdCase(int idCase) {
+ this.idCase = idCase;
+ }
+
+ public void setCoordX(int coordX) {
+ this.coordX = coordX;
+ }
+
+ public void setCoordY(int coordY) {
+ this.coordY = coordY;
+ }
+
+ public void setStart(boolean start) {
+ isStart = start;
+ }
+
+ public void setEnd(boolean end) {
+ isEnd = end;
+ }
+}
diff --git a/code/src/model/Map.java b/code/src/model/Map.java
new file mode 100644
index 0000000..2a8acda
--- /dev/null
+++ b/code/src/model/Map.java
@@ -0,0 +1,56 @@
+package model;
+
+import java.util.ArrayList;
+
+public class Map {
+ private int sizeTile;
+ private int sizeMap;
+ private ArrayList map;
+
+ public Map(int sizeTile, int sizeMap) {
+ this.sizeTile = sizeTile;
+ this.sizeMap = sizeMap;
+ this.map = new ArrayList();
+ }
+
+ public void addCase(Case c) {
+ this.map.add(c);
+ }
+
+ public void removeCase(Case c) {
+ this.map.remove(c);
+ }
+
+ public ArrayList getMap() {
+ return this.map;
+ }
+
+ public int getSizeTile() {
+ return this.sizeTile;
+ }
+
+ public int getSizeMap() {
+ return this.sizeMap;
+ }
+
+ public int getCoordStartX(){
+ for(Case c : this.map){
+ if(c.isStart == true){
+ return c.getCoordX();
+ }
+ }
+ return 666; //code erreur
+ }
+
+ public int getCoordStartY(){
+ for(Case c : this.map){
+ if(c.isStart == true){
+ return c.getCoordY();
+ }
+ }
+ return 666; //code erreur
+ }
+
+}
+
+