parent
3a9a240e7d
commit
eb560344ee
@ -1,21 +1,13 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
<?import com.jfoenix.controls.JFXButton?>
|
|
||||||
<?import javafx.scene.control.Label?>
|
|
||||||
<?import javafx.scene.control.SplitPane?>
|
|
||||||
<?import javafx.scene.effect.Shadow?>
|
|
||||||
<?import javafx.scene.image.Image?>
|
<?import javafx.scene.image.Image?>
|
||||||
<?import javafx.scene.image.ImageView?>
|
<?import javafx.scene.image.ImageView?>
|
||||||
<?import javafx.scene.layout.AnchorPane?>
|
<?import javafx.scene.layout.AnchorPane?>
|
||||||
<?import javafx.scene.shape.Line?>
|
|
||||||
<?import javafx.scene.shape.Rectangle?>
|
|
||||||
<?import javafx.scene.text.Font?>
|
|
||||||
|
|
||||||
<AnchorPane fx:id="levelRoot" fx:controller="controller.GamePlayController" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="600.0" prefWidth="900.0" xmlns="http://javafx.com/javafx/11" xmlns:fx="http://javafx.com/fxml/1" >
|
<AnchorPane fx:id="levelRoot" fx:controller="controller.GamePlayController" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="600.0" prefWidth="900.0" xmlns="http://javafx.com/javafx/11" xmlns:fx="http://javafx.com/fxml/1" >
|
||||||
<ImageView fx:id="persoImageView" fitHeight="32.0" fitWidth="32.0" layoutX="132.0" layoutY="74.0" pickOnBounds="true"
|
<ImageView fx:id="persoImageView" fitHeight="32.0" fitWidth="32.0" layoutX="132.0" layoutY="74.0"
|
||||||
|
pickOnBounds="true"
|
||||||
preserveRatio="true">
|
preserveRatio="true">
|
||||||
<image>
|
<Image url="@../image/personnage/Perso1.png"/>
|
||||||
<Image url="image/personnage/Perso1.png"/>
|
|
||||||
</image>
|
|
||||||
</ImageView>
|
</ImageView>
|
||||||
</AnchorPane>
|
</AnchorPane>
|
@ -1,53 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
|
|
||||||
<?import com.jfoenix.controls.JFXButton?>
|
|
||||||
<?import javafx.scene.control.Label?>
|
|
||||||
<?import javafx.scene.control.SplitPane?>
|
|
||||||
<?import javafx.scene.effect.Shadow?>
|
|
||||||
<?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.control.Button?>
|
|
||||||
<AnchorPane fx:id="levelRoot" id="1" fx:controller="controller.GamePlayController" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="1300.0" prefWidth="900.0" xmlns="http://javafx.com/javafx/11" xmlns:fx="http://javafx.com/fxml/1" >
|
|
||||||
<children>
|
|
||||||
<AnchorPane minHeight="400.0" minWidth="400.0" prefHeight="608.0" prefWidth="348.0" layoutX="960.0">
|
|
||||||
<children>
|
|
||||||
<Rectangle arcHeight="5.0" arcWidth="5.0" fill="#323436" height="900.0" layoutY="0.0" stroke="BLACK" strokeType="INSIDE" width="340" />
|
|
||||||
<ImageView fitHeight="128.0" fitWidth="93.0" layoutX="50.0" layoutY="33.0" pickOnBounds="true" preserveRatio="true">
|
|
||||||
<image>
|
|
||||||
<Image url="@../image/personnage/Perso1.2.png" />
|
|
||||||
</image>
|
|
||||||
</ImageView>
|
|
||||||
<Label layoutX="144.0" layoutY="59.0" prefHeight="41.0" prefWidth="124.0" text="Pseudonyme" textFill="WHITE">
|
|
||||||
<font>
|
|
||||||
<Font name="Segoe UI Black" size="16.0" />
|
|
||||||
</font>
|
|
||||||
</Label>
|
|
||||||
<Rectangle arcHeight="5.0" arcWidth="5.0" height="331.0" layoutX="50.0" layoutY="166.0" opacity="0.3" stroke="BLACK" strokeDashOffset="10.0" strokeLineCap="ROUND" strokeLineJoin="ROUND" strokeMiterLimit="100.0" strokeType="INSIDE" strokeWidth="5.0" width="201.0" />
|
|
||||||
<Line endX="100.0" layoutX="139.0" layoutY="222.0" startX="-77.0" stroke="#f2f0f0" />
|
|
||||||
<Label alignment="CENTER" layoutX="88.0" layoutY="173.0" prefHeight="41.0" prefWidth="124.0" text="Action" textFill="WHITE">
|
|
||||||
<font>
|
|
||||||
<Font name="Segoe UI" size="16.0" />
|
|
||||||
</font>
|
|
||||||
</Label>
|
|
||||||
<JFXButton fx:id="buttonDe" onAction="#lancerDe" layoutX="95.0" layoutY="530.0" prefHeight="30.0" prefWidth="119.0" ripplerFill="#e1e1e1" style="-fx-background-color: #EB9C0A;" text="Lancer le dé" textAlignment="CENTER" textFill="WHITE">
|
|
||||||
<font>
|
|
||||||
<Font name="Segoe UI" size="15.0" />
|
|
||||||
</font>
|
|
||||||
<effect>
|
|
||||||
<Shadow />
|
|
||||||
</effect>
|
|
||||||
</JFXButton>
|
|
||||||
<ImageView fx:id="de" fitWidth="75" fitHeight="75" layoutX="100" layoutY="580.0" pickOnBounds="true" preserveRatio="true">
|
|
||||||
<image>
|
|
||||||
<Image url="@../image/dé/icon.png"/>
|
|
||||||
</image>
|
|
||||||
</ImageView>
|
|
||||||
</children>
|
|
||||||
</AnchorPane>
|
|
||||||
</children>
|
|
||||||
</AnchorPane>
|
|
@ -0,0 +1,44 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<?import javafx.scene.image.Image?>
|
||||||
|
<?import javafx.scene.image.ImageView?>
|
||||||
|
<?import javafx.scene.layout.AnchorPane?>
|
||||||
|
<?import javafx.scene.shape.Rectangle?>
|
||||||
|
|
||||||
|
|
||||||
|
<?import com.jfoenix.controls.JFXButton?>
|
||||||
|
<?import javafx.scene.text.Font?>
|
||||||
|
<?import javafx.scene.effect.Shadow?>
|
||||||
|
<?import javafx.scene.shape.Line?>
|
||||||
|
<?import javafx.scene.text.Text?>
|
||||||
|
<AnchorPane fx:id="levelRoot" id="1" fx:controller="controller.GamePlayController" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="900.0" prefWidth="1300.0" xmlns="http://javafx.com/javafx/11" xmlns:fx="http://javafx.com/fxml/1">
|
||||||
|
<children>
|
||||||
|
<Rectangle arcHeight="5.0" arcWidth="5.0" fill="#393e43" height="900.0" layoutX="960.0" stroke="BLACK" strokeType="INSIDE" width="340.0" />
|
||||||
|
<ImageView fx:id="playerImagePerso" fitHeight="123.0" fitWidth="110.0" layoutX="1075.0" layoutY="76.0" pickOnBounds="true" preserveRatio="true">
|
||||||
|
<image>
|
||||||
|
<Image url="/image/personnage/Perso1.2.png" />
|
||||||
|
</image>
|
||||||
|
</ImageView>
|
||||||
|
<Rectangle arcHeight="5.0" arcWidth="5.0" fill="#090a0a" height="373.0" layoutX="1014.0" layoutY="238.0" opacity="0.48" stroke="BLACK" strokeType="INSIDE" width="232.0" />
|
||||||
|
<ImageView fx:id="de" fitHeight="76.0" fitWidth="150.0" layoutX="1092.0" layoutY="648.0" pickOnBounds="true" preserveRatio="true">
|
||||||
|
<image>
|
||||||
|
<Image url="@../image/dé/icon.png" />
|
||||||
|
</image>
|
||||||
|
</ImageView>
|
||||||
|
<Line endX="100.0" layoutX="1130.0" layoutY="289.0" startX="-100.0" stroke="WHITE" />
|
||||||
|
<Line endX="100.0" layoutX="1130.0" layoutY="600.0" startX="-100.0" stroke="WHITE" />
|
||||||
|
<Text fill="WHITE" layoutX="1102.0" layoutY="270.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Action" textAlignment="CENTER" wrappingWidth="55.4375">
|
||||||
|
<font>
|
||||||
|
<Font name="Segoe UI" size="16.0" />
|
||||||
|
</font>
|
||||||
|
</Text>
|
||||||
|
<JFXButton layoutX="1071.0" layoutY="752.0" onAction="#lancerDe" prefHeight="30.0" prefWidth="119.0" ripplerFill="#e1e1e1" style="-fx-background-color: #EB9C0A;" text="Lancer le dé" textAlignment="CENTER" textFill="WHITE">
|
||||||
|
<font>
|
||||||
|
<Font name="Segoe UI" size="15.0" />
|
||||||
|
</font>
|
||||||
|
<effect>
|
||||||
|
<Shadow />
|
||||||
|
</effect>
|
||||||
|
</JFXButton>
|
||||||
|
</children>
|
||||||
|
</AnchorPane>
|
After Width: | Height: | Size: 40 KiB |
@ -0,0 +1,35 @@
|
|||||||
|
package model;
|
||||||
|
|
||||||
|
public enum Bonus {
|
||||||
|
|
||||||
|
MOVE_FORWARD_1,
|
||||||
|
MOVE_FORWARD_3,
|
||||||
|
MOVE_FORWARD_5,
|
||||||
|
MOVE_FORWARD_8,
|
||||||
|
NEW_DICE;
|
||||||
|
|
||||||
|
public Bonus randomGet(){
|
||||||
|
int i = (int) (Math.random() * 8);
|
||||||
|
switch (i) {
|
||||||
|
case 0:
|
||||||
|
case 1:
|
||||||
|
case 2:
|
||||||
|
return Bonus.MOVE_FORWARD_1;
|
||||||
|
|
||||||
|
case 3:
|
||||||
|
case 4:
|
||||||
|
return Bonus.MOVE_FORWARD_3;
|
||||||
|
|
||||||
|
case 5:
|
||||||
|
case 6:
|
||||||
|
return Bonus.MOVE_FORWARD_5;
|
||||||
|
|
||||||
|
case 7:
|
||||||
|
return Bonus.MOVE_FORWARD_8;
|
||||||
|
|
||||||
|
case 8:
|
||||||
|
return Bonus.NEW_DICE;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,9 @@
|
|||||||
|
package model;
|
||||||
|
|
||||||
|
public class BonusCase extends Case {
|
||||||
|
|
||||||
|
public BonusCase(int idCase, int coordX, int coordY, boolean isStart, boolean isEnd, Map map, Bonus bonus) {
|
||||||
|
super(idCase, coordX, coordY, isStart, isEnd, map);
|
||||||
|
Bonus bonus1 = bonus.randomGet();
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,31 @@
|
|||||||
|
package model;
|
||||||
|
|
||||||
|
public enum Malus {
|
||||||
|
|
||||||
|
MOVE_BACKWARD_1, // Recule de 1
|
||||||
|
MOVE_BACKWARD_3, // Recule de 3
|
||||||
|
MOVE_BACKWARD_5, // Recule de 5
|
||||||
|
LAST_POSITION; // Retour a la position initiale
|
||||||
|
|
||||||
|
public Malus randomGet(){
|
||||||
|
int i = (int) (Math.random() * 8);
|
||||||
|
switch (i) {
|
||||||
|
case 0:
|
||||||
|
case 1:
|
||||||
|
case 2:
|
||||||
|
return Malus.MOVE_BACKWARD_1;
|
||||||
|
|
||||||
|
case 3:
|
||||||
|
case 4:
|
||||||
|
return Malus.MOVE_BACKWARD_3;
|
||||||
|
|
||||||
|
case 5:
|
||||||
|
case 6:
|
||||||
|
return Malus.MOVE_BACKWARD_5;
|
||||||
|
|
||||||
|
case 7:
|
||||||
|
return Malus.LAST_POSITION;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,10 @@
|
|||||||
|
package model;
|
||||||
|
|
||||||
|
public class MalusCase extends Case{
|
||||||
|
|
||||||
|
public MalusCase(int idCase, int coordX, int coordY, boolean isStart, boolean isEnd, Map map, Malus malus) {
|
||||||
|
super(idCase, coordX, coordY, isStart, isEnd, map);
|
||||||
|
Malus malus1 = malus.randomGet();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in new issue