Skip to content
Snippets Groups Projects
Commit f4bb37e9 authored by plojolo's avatar plojolo
Browse files

Le jeu ne se lance plus automatiquement

parent 7853e20a
Branches
No related tags found
No related merge requests found
......@@ -3,7 +3,6 @@ package controller;
import javafx.animation.Animation;
import javafx.animation.KeyFrame;
import javafx.animation.Timeline;
import javafx.beans.property.StringProperty;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.fxml.FXML;
......@@ -12,7 +11,6 @@ import javafx.scene.control.Label;
import javafx.scene.control.TextField;
import javafx.scene.control.ToggleButton;
import javafx.scene.control.ToggleGroup;
import javafx.scene.layout.StackPane;
import javafx.scene.layout.VBox;
import javafx.scene.paint.Color;
import javafx.util.Duration;
......@@ -50,7 +48,7 @@ public class Controller {
private Timeline timeline;
private Board<List<ModelElements>> board;
public static final HashMap<String, Integer> elementsCountFireFighter = new HashMap<String, Integer>() {
public static final HashMap<String, Integer> elementsCountFireFighter = new HashMap<>() {
{
put("fire_count", 5);
put("firefighter_count", 6);
......@@ -61,7 +59,7 @@ public class Controller {
put("rockery_count", 4);
}
};
public static final HashMap<String, Integer> elementsCountRockScissorPaper = new HashMap<String, Integer>() {
public static final HashMap<String, Integer> elementsCountRockScissorPaper = new HashMap<>() {
{
put("rock_count", 3);
put("scissor_count", 3);
......@@ -162,7 +160,8 @@ public class Controller {
elementsCount = elementsCountFireFighter;
gamemode = 0;
}
repaintGrid();
restartButtonAction();
pause();
}
public void play() {
......
......@@ -42,8 +42,10 @@
prefHeight="24.0" prefWidth="200.0" />
<VBox fx:id="parameters">
</VBox>
<Separator maxHeight="-Infinity" maxWidth="-Infinity"
prefHeight="24.0" prefWidth="200.0" />
<Button fx:id="changeGamemode" maxHeight="-Infinity" maxWidth="-Infinity"
mnemonicParsing="false" onAction="#changeGamemode" prefHeight="24.0"
mnemonicParsing="false" onAction="#changeGamemode" prefHeight="50.0"
prefWidth="200.0"
text="Change Gamemode" />
<Separator maxHeight="-Infinity" maxWidth="-Infinity"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment