musique opérationel

la musique ne se termine pas quand la page est fermé (pas trouvé comment faire)
julien
ZIRTR0X 4 years ago
parent 3a9e5f5f6a
commit 976cc00894

@ -0,0 +1,8 @@
# Default ignored files
/shelf/
/workspace.xml
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml
# Editor-based HTTP Client requests
/httpRequests/

@ -0,0 +1,4 @@
#player{
-fx-text-fill: #ffffff;
}

@ -0,0 +1,10 @@
.round-red {
-fx-background-color: linear-gradient(#ff5400, #EB9C0A);
-fx-background-radius: 30;
-fx-background-insets: 0;
-fx-text-fill: white;
}
.root{
-fx-background-color: #3A3A41;
}

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import com.jfoenix.controls.JFXButton?>
<?import javafx.scene.control.*?>
<?import javafx.scene.effect.Shadow?>
<?import javafx.scene.image.Image?>
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.paint.*?>
<?import javafx.scene.shape.Rectangle?>
<?import javafx.scene.text.*?>
<?import java.net.URL?>
<AnchorPane>
<ImageView fitHeight="600.0" fitWidth="1300" layoutX="133.0" layoutY="150.0" pickOnBounds="true" preserveRatio="true"
AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0"
AnchorPane.topAnchor="0.0">
<Image url="/image/plaine.gif"/>
</ImageView>
<Rectangle arcHeight="5.0" arcWidth="5.0" height="600.0" layoutX="50" opacity="0.42" stroke="BLACK"
strokeType="INSIDE" width="800.0"/>
</AnchorPane>

@ -0,0 +1,43 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import com.jfoenix.controls.JFXButton?>
<?import javafx.scene.effect.Shadow?>
<?import javafx.scene.image.Image?>
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.shape.Circle?>
<?import javafx.scene.text.Font?>
<AnchorPane fx:id="mainRoot" xmlns:fx="http://javafx.com/fxml/1" id="pane" maxHeight="-Infinity" maxWidth="-Infinity"
minHeight="-Infinity"
minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0"
xmlns="http://javafx.com/javafx/11" fx:controller="controller.MainPageController">
<ImageView fitHeight="600.0" fitWidth="1300" layoutX="133.0" layoutY="150.0" pickOnBounds="true" preserveRatio="true"
AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0"
AnchorPane.topAnchor="0.0">
<Image url="/image/plaine.gif"/>
</ImageView>
<Circle layoutX="146.0" layoutY="138.0" opacity="0.42" radius="219.0" stroke="BLACK" strokeType="INSIDE"/>
<ImageView fitHeight="205.0" fitWidth="204.0" layoutX="61.0" layoutY="-26.0" pickOnBounds="true"
preserveRatio="true">
<Image url="/image/logo.png"/>
</ImageView>
<JFXButton layoutX="104.0" layoutY="163.0" prefHeight="30.0" prefWidth="119.0"
style="-fx-background-color: #EB9C0A;" text="New Game" textFill="WHITE" onMouseClicked="#startGame">
<font>
<Font name="Segoe UI Black" size="15.0"/>
</font>
<effect>
<Shadow/>
</effect>
</JFXButton>
<JFXButton layoutX="104.0" layoutY="222.0" prefHeight="30.0" prefWidth="119.0"
style="-fx-background-color: #EB9C0A;" text="Best Players" textFill="WHITE" onMouseClicked="#viewScore">
<font>
<Font name="Segoe UI Black" size="15.0"/>
</font>
<effect>
<Shadow/>
</effect>
</JFXButton>
</AnchorPane>

@ -0,0 +1,137 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import com.jfoenix.controls.JFXButton?>
<?import javafx.scene.control.*?>
<?import javafx.scene.effect.Shadow?>
<?import javafx.scene.image.Image?>
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.paint.*?>
<?import javafx.scene.shape.Rectangle?>
<?import javafx.scene.text.*?>
<?import java.net.URL?>
<AnchorPane fx:id="levelRoot" xmlns:fx="http://javafx.com/fxml/1" id="pane" maxHeight="-Infinity" maxWidth="-Infinity"
minHeight="-Infinity"
minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0"
xmlns="http://javafx.com/javafx/11" fx:controller="controller.TopPlayerController">
<ImageView fitHeight="600.0" fitWidth="1300" layoutX="133.0" layoutY="150.0" pickOnBounds="true" preserveRatio="true"
AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0"
AnchorPane.topAnchor="0.0">
<Image url="/image/plaine.gif"/>
</ImageView>
<JFXButton onMouseClicked="#returnToMenu" layoutX="20.0" layoutY="10.0" prefHeight="30.0" prefWidth="80.0"
style="-fx-background-color: #EB9C0A;"
text="Retour" textFill="WHITE">
<font>
<Font name="Segoe UI Black" size="13.0"/>
</font>
<effect>
<Shadow/>
</effect>
</JFXButton>
<Rectangle arcHeight="5.0" arcWidth="5.0" height="600.0" layoutX="200" opacity="0.42" stroke="BLACK"
strokeType="INSIDE" width="500.0"/>
<ImageView fitHeight="205.0" fitWidth="204.0" layoutX="350.0" layoutY="-4.0" pickOnBounds="true"
preserveRatio="true">
<Image url="/image/logo.png"/>
</ImageView>
<Label layoutX="387.0" layoutY="168.0" text="Top Players">
<font>
<Font name="Segoe UI Black" size="22.0"/>
</font>
</Label>
<Label layoutX="395.0" layoutY="211.0" text="1 - ZartaX0O3">
<font>
<Font name="Segoe UI Black" size="17.0"/>
</font>
<textFill>
<LinearGradient startX="0.3981042654028436">
<stops>
<Stop>
<color>
<Color red="0.9342105388641357" green="0.7629386186599731"/>
</color>
</Stop>
<Stop offset="1.0">
<color>
<Color red="1.0" green="0.5557553768157959"/>
</color>
</Stop>
</stops>
</LinearGradient>
</textFill>
</Label>
<Label layoutX="250.0" layoutY="260.0" text="2 - ZartaX0O3">
<font>
<Font name="Segoe UI Black" size="17.0"/>
</font>
<textFill>
<LinearGradient endX="1.0" endY="1.0" startX="0.4075829383886256">
<stops>
<Stop>
<color>
<Color/>
</color>
</Stop>
<Stop offset="1.0">
<color>
<Color red="1.0" green="1.0" blue="1.0"/>
</color>
</Stop>
</stops>
</LinearGradient>
</textFill>
</Label>
<Label layoutX="530.0" layoutY="260.0" text="3 - ZartaX0O3">
<font>
<Font name="Segoe UI Black" size="17.0"/>
</font>
<textFill>
<LinearGradient endX="1.0" endY="1.0" startX="0.3981042654028436">
<stops>
<Stop>
<color>
<Color red="0.4868420958518982" green="0.32828032970428467" blue="0.03380848094820976"/>
</color>
</Stop>
<Stop offset="1.0">
<color>
<Color red="0.05263157933950424" green="0.051315788179636" blue="0.049707602709531784"/>
</color>
</Stop>
</stops>
</LinearGradient>
</textFill>
</Label>
<Label id="player" layoutX="395.0" layoutY="315.0" text="4 - ZartaX0O3" textFill="WHITE">
<font>
<Font name="Segoe UI Black" size="17.0"/>
</font>
</Label>
<Label id="player" layoutX="395.0" layoutY="382.0" text="6 - ZartaX0O3" textFill="WHITE">
<font>
<Font name="Segoe UI Black" size="17.0"/>
</font>
</Label>
<Label id="player" layoutX="395.0" layoutY="347.0" text="5 - ZartaX0O3" textFill="WHITE">
<font>
<Font name="Segoe UI Black" size="17.0"/>
</font>
</Label>
<Label id="player" layoutX="395.0" layoutY="417.0" text="7 - ZartaX0O3" textFill="WHITE">
<font>
<Font name="Segoe UI Black" size="17.0"/>
</font>
</Label>
<Label id="player" layoutX="395.0" layoutY="450.0" text="8 - ZartaX0O3" textFill="WHITE">
<font>
<Font name="Segoe UI Black" size="17.0"/>
</font>
</Label>
<Label id="player" layoutX="395.0" layoutY="486.0" text="9 - ZartaX0O3" textFill="WHITE">
<font>
<Font name="Segoe UI Black" size="17.0"/>
</font>
</Label>
</AnchorPane>

@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.image.Image?>
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.shape.Line?>
<?import javafx.scene.shape.Rectangle?>
<?import javafx.scene.text.Font?>
<?import javafx.scene.text.Text?>
<AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="600.0" prefWidth="900.0" xmlns="http://javafx.com/javafx/17" xmlns:fx="http://javafx.com/fxml/1">
<children>
<ImageView fitHeight="600.0" fitWidth="600.0" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@terrain/map1.png" />
</image>
</ImageView>
<Rectangle arcWidth="5.0" fill="#535353" height="614.0" layoutX="599.0" layoutY="-7.0" stroke="BLACK" strokeType="INSIDE" strokeWidth="0.0" width="302.0" />
<ImageView fitHeight="85.0" fitWidth="59.0" layoutX="625.0" layoutY="28.0" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@personnage/Perso1.2.png" />
</image>
</ImageView>
<Text fill="WHITE" layoutX="712.0" layoutY="64.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Joueur 1">
<font>
<Font name="Segoe UI Black" size="19.0" />
</font>
</Text>
<Button layoutX="711.0" layoutY="519.0" mnemonicParsing="false" style="-fx-background-color: #ffa20d;" text="Lancer le dé" textFill="WHITE" />
<Rectangle arcHeight="20.0" arcWidth="20.0" height="342.0" layoutX="624.0" layoutY="149.0" opacity="0.21" stroke="BLACK" strokeType="INSIDE" strokeWidth="0.0" width="252.0" />
<Text fill="WHITE" layoutX="729.0" layoutY="180.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Action">
<font>
<Font size="15.0" />
</font>
</Text>
<Line endX="74.33331298828125" endY="1.52587890625E-5" layoutX="763.0" layoutY="201.0" startX="-100.0" stroke="WHITE" />
</children>
</AnchorPane>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 295 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 675 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 862 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.Cursor?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.SplitPane?>
<?import javafx.scene.effect.ImageInput?>
<?import javafx.scene.image.Image?>
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.text.Text?>
<SplitPane dividerPositions="0.6635044642857143" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" style="-fx-background-color: #404040;" xmlns:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx/17">
<items>
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="397.0" prefWidth="439.0">
<children>
<ImageView fitHeight="397.0" fitWidth="397.0" layoutX="-2.0" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@../terrain/map1.png" />
</image>
</ImageView>
</children></AnchorPane>
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="397.0" prefWidth="197.0" style="-fx-background-color: darkgray;">
<children>
<Button layoutX="59.0" layoutY="311.0" mnemonicParsing="false" text="Lancer le dé" />
<Text layoutX="63.0" layoutY="155.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Tours :" />
<ImageView fitHeight="67.0" fitWidth="62.0" layoutX="28.0" layoutY="69.0" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@Perso1.2.png" />
</image>
</ImageView>
</children>
<effect>
<ImageInput />
</effect></AnchorPane>
</items>
<cursor>
<Cursor fx:constant="DEFAULT" />
</cursor>
</SplitPane>

Binary file not shown.

After

Width:  |  Height:  |  Size: 960 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 366 KiB

@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.image.Image?>
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.shape.Line?>
<?import javafx.scene.shape.Rectangle?>
<?import javafx.scene.text.Font?>
<?import javafx.scene.text.Text?>
<AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="600.0" prefWidth="900.0" xmlns="http://javafx.com/javafx/17" xmlns:fx="http://javafx.com/fxml/1">
<children>
<ImageView fitHeight="600.0" fitWidth="600.0" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@terrain/map1.png" />
</image>
</ImageView>
<Rectangle arcWidth="5.0" fill="#535353" height="614.0" layoutX="599.0" layoutY="-7.0" stroke="BLACK" strokeType="INSIDE" strokeWidth="0.0" width="302.0" />
<ImageView fitHeight="85.0" fitWidth="59.0" layoutX="625.0" layoutY="28.0" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@personnage/Perso1.2.png" />
</image>
</ImageView>
<Text fill="WHITE" layoutX="712.0" layoutY="64.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Joueur 1">
<font>
<Font name="Segoe UI Black" size="19.0" />
</font>
</Text>
<Button layoutX="711.0" layoutY="519.0" mnemonicParsing="false" style="-fx-background-color: #ffa20d;" text="Lancer le dé" textFill="WHITE" />
<Rectangle arcHeight="20.0" arcWidth="20.0" height="342.0" layoutX="624.0" layoutY="149.0" opacity="0.21" stroke="BLACK" strokeType="INSIDE" strokeWidth="0.0" width="252.0" />
<Text fill="WHITE" layoutX="729.0" layoutY="180.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Action">
<font>
<Font size="15.0" />
</font>
</Text>
<Line endX="74.33331298828125" endY="1.52587890625E-5" layoutX="763.0" layoutY="201.0" startX="-100.0" stroke="WHITE" />
</children>
</AnchorPane>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.Cursor?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.SplitPane?>
<?import javafx.scene.effect.ImageInput?>
<?import javafx.scene.image.Image?>
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.text.Text?>
<SplitPane dividerPositions="0.6635044642857143" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" style="-fx-background-color: #404040;" xmlns:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx/17">
<items>
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="397.0" prefWidth="439.0">
<children>
<ImageView fitHeight="397.0" fitWidth="397.0" layoutX="-2.0" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@../terrain/map1.png" />
</image>
</ImageView>
</children></AnchorPane>
<AnchorPane minHeight="0.0" minWidth="0.0" prefHeight="397.0" prefWidth="197.0" style="-fx-background-color: darkgray;">
<children>
<Button layoutX="59.0" layoutY="311.0" mnemonicParsing="false" text="Lancer le dé" />
<Text layoutX="63.0" layoutY="155.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Tours :" />
<ImageView fitHeight="67.0" fitWidth="62.0" layoutX="28.0" layoutY="69.0" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@Perso1.2.png" />
</image>
</ImageView>
</children>
<effect>
<ImageInput />
</effect></AnchorPane>
</items>
<cursor>
<Cursor fx:constant="DEFAULT" />
</cursor>
</SplitPane>

Binary file not shown.

After

Width:  |  Height:  |  Size: 366 KiB

@ -6,6 +6,7 @@ import javafx.scene.Parent;
import javafx.scene.Scene; import javafx.scene.Scene;
import javafx.scene.media.MediaPlayer; import javafx.scene.media.MediaPlayer;
import javafx.stage.Stage; import javafx.stage.Stage;
import model.Album;
import model.Database; import model.Database;
import javafx.scene.media.Media; import javafx.scene.media.Media;
import model.Musique; import model.Musique;
@ -14,6 +15,8 @@ import java.io.File;
import java.io.*; import java.io.*;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects; import java.util.Objects;
public class Main extends Application { public class Main extends Application {
@ -28,11 +31,18 @@ public class Main extends Application {
primaryStage.setScene(new Scene(root, 900, 600)); primaryStage.setScene(new Scene(root, 900, 600));
primaryStage.setResizable(false); primaryStage.setResizable(false);
primaryStage.show(); primaryStage.show();
String pathmusique ="/musique/medieval_musique1.mp3"; //String pathmusique ="/musique/medieval_musique1.mp3";
System.out.println(pathmusique); ArrayList<Musique> musiqueListe = new ArrayList<Musique>();
Musique song = new Musique(); Musique song1 = new Musique("/musique/medieval_musique1.mp3",211000);
song.play(pathmusique); Musique song2 = new Musique("/musique/medieval_musique2.mp3",248000);
//song.sound.isPlaying() Musique song3 = new Musique("/musique/medieval_musique3.mp3",248000);
Musique song4 = new Musique("/musique/medieval_musique4.mp3",209000);
Album song = new Album(musiqueListe);
song.addList(song1);
song.addList(song2);
song.addList(song3);
song.addList(song4);
song.play();
} }

@ -0,0 +1,76 @@
package model;
import javafx.scene.media.AudioClip;
import javafx.scene.media.Media;
import javafx.scene.media.MediaPlayer;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
public class Album {
private ArrayList<Musique> listeMusiques;
public Album(ArrayList<Musique> listeMusiques) {
this.listeMusiques = listeMusiques;
}
public void playlist() throws InterruptedException {
}
public void play() throws InterruptedException {
//System.out.println(listeMusiques.get(0).getPath());
/*AudioClip mediaPlayer;
Musique musicActuelle;
int i=1;
while(mediaPlayer.isPlaying() == true) {
musicActuelle = listeMusiques.get(i);
if (musicActuelle == null) {
i = 0;
}
Media media = new Media(Objects.requireNonNull(getClass().getResource(musicActuelle.getPath())).toExternalForm());
mediaPlayer = new AudioClip(media.getSource());
mediaPlayer.volumeProperty().setValue(0.025);
mediaPlayer.play();
i++;
}*/
Thread musicThread = new Thread("musique") {
public void run(){
int i;
Media media;
AudioClip mediaPlayer;
while(true){
for (Musique musique : listeMusiques) {
media = new Media(Objects.requireNonNull(getClass().getResource(musique.getPath())).toExternalForm());
mediaPlayer = new AudioClip(media.getSource());
mediaPlayer.volumeProperty().setValue(0.025);
mediaPlayer.play();
try {
Thread.sleep(musique.getTemps());
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
}
};
musicThread.start();
}
public void addList(Musique musique){
listeMusiques.add(musique);
System.out.println("add");
}
public void removeList(Musique musique){
listeMusiques.remove(musique);
}
public List<Musique> getListeMusiques() {
return listeMusiques;
}
}

@ -1,18 +0,0 @@
package model;
public class CaseChance extends Case{
String bonus;
public CaseChance(int idCase, int coordX, int coordY, boolean isStart, boolean isEnd, String bonus) {
super(idCase, coordX, coordY, isStart, isEnd);
this.bonus = bonus;
}
public String getBonus() {
return bonus;
}
public void setBonus(String bonus) {
this.bonus = bonus;
}
}

@ -1,18 +0,0 @@
package model;
public class CaseEvenement extends Case{
String evenement;
public CaseEvenement(int idCase, int coordX, int coordY, boolean isStart, boolean isEnd, String evenement) {
super(idCase, coordX, coordY, isStart, isEnd);
this.evenement = evenement;
}
public String getEvenement() {
return evenement;
}
public void setEvenement(String evenement) {
this.evenement = evenement;
}
}

@ -1,18 +0,0 @@
package model;
public class CaseMalchance extends Case {
String malus;
public CaseMalchance(int idCase, int coordX, int coordY, boolean isStart, boolean isEnd, String malus) {
super(idCase, coordX, coordY, isStart, isEnd);
this.malus = malus;
}
public String getMalus() {
return malus;
}
public void setMalus(String malus) {
this.malus = malus;
}
}

@ -1,37 +0,0 @@
package model;
public class Joueur {
int idJoueur;
String pseudonyme;
int scoreMax;
public Joueur(int idJoueur, String pseudonyme, int scoreMax) {
this.idJoueur = idJoueur;
this.pseudonyme = pseudonyme;
this.scoreMax = scoreMax;
}
public int getIdJoueur() {
return idJoueur;
}
public String getPseudonyme() {
return pseudonyme;
}
public int getScoreMax() {
return scoreMax;
}
public void setIdJoueur(int idJoueur) {
this.idJoueur = idJoueur;
}
public void setPseudonyme(String pseudonyme) {
this.pseudonyme = pseudonyme;
}
public void setScoreMax(int scoreMax) {
this.scoreMax = scoreMax;
}
}

@ -8,12 +8,19 @@ import javafx.scene.media.MediaPlayer;
import java.util.Objects; import java.util.Objects;
public class Musique { public class Musique {
private String path;
private int temps;
public void play(String path) { public Musique(String path , int temps) {
Media media = new Media(Objects.requireNonNull(getClass().getResource(path)).toExternalForm()); this.path = path;
AudioClip mediaPlayer = new AudioClip(media.getSource()); this.temps = temps;
mediaPlayer.volumeProperty().setValue(0.025); }
mediaPlayer.play();
public String getPath() {
return path;
}
public int getTemps() {
return temps;
} }
} }

@ -1,38 +0,0 @@
package model;
import java.time.LocalDateTime;
public class Partie {
int idPartie;
LocalDateTime temps;
int scorePartie;
public Partie(int idPartie, LocalDateTime temps, int scorePartie) {
this.idPartie = idPartie;
this.scorePartie = scorePartie;
this.temps = temps;
}
public int getIdPartie() {
return idPartie;
}
public LocalDateTime getTemps() {
return temps;
}
public int getScorePartie() {
return scorePartie;
}
public void setIdPartie(int idPartie) {
this.idPartie = idPartie;
}
public void setTemps(LocalDateTime temps) {
this.temps = temps;
}
public void setScorePartie(int scorePartie) {
this.scorePartie = scorePartie;
}
}

@ -1,37 +0,0 @@
package model;
public class Plateau {
int idPlateau;
int taille;
int difficulte;
public Plateau(int idPlateau, int taille, int difficulte) {
this.idPlateau = idPlateau;
this.taille = taille;
this.difficulte = difficulte;
}
public int getIdPlateau() {
return idPlateau;
}
public int getTaille() {
return taille;
}
public int getDifficulte() {
return difficulte;
}
public void setIdPlateau(int idPlateau) {
this.idPlateau = idPlateau;
}
public void setTaille(int taille) {
this.taille = taille;
}
public void setDifficulte(int difficulte) {
this.difficulte = difficulte;
}
}
Loading…
Cancel
Save