Small updates

This commit is contained in:
Julius de Jeu 2017-04-14 11:09:40 +02:00
parent 8e3f164ffe
commit 4563cfb6e3
5 changed files with 30 additions and 6 deletions

View file

@ -29,7 +29,7 @@ public class Game extends Pane {
public Game() { public Game() {
Collections.shuffle(players); Collections.shuffle(players);
Image bord = new Image(ModLoader.getFile("/svg/Bord.svg")); Image bord = new Image(ModLoader.getFile("/svg/bord2.svg"));
ImageView view = new ImageView(bord); ImageView view = new ImageView(bord);
view.setPreserveRatio(true); view.setPreserveRatio(true);
@ -59,7 +59,7 @@ public class Game extends Pane {
playerTurn.setFitHeight(400); playerTurn.setFitHeight(400);
Label l = new Label(); Label l = new Label();
l.setTranslateX(1035); l.setTranslateX(965);
l.setTranslateY(370); l.setTranslateY(370);
@ -75,7 +75,7 @@ public class Game extends Pane {
if (roll == 4) Player.four(); if (roll == 4) Player.four();
int next = players.get(Player.getNextActive()).getCh(); int next = players.get(Player.getNextActive()).getCh();
playerTurn.setImage(Menu.images[next]); playerTurn.setImage(Menu.images[next]);
l.setText(Menu.names[next]); l.setText(Menu.names[next] + " is aan de beurt!");
Player.four(); Player.four();
})); }));
//this.setBackground(new Background(new BackgroundFill(Color.RED, null, null))); //this.setBackground(new Background(new BackgroundFill(Color.RED, null, null)));
@ -84,7 +84,7 @@ public class Game extends Pane {
} }
playerTurn.setImage(Menu.images[players.get(1).getCh()]); playerTurn.setImage(Menu.images[players.get(1).getCh()]);
l.setText(Menu.names[players.get(1).getCh()]); l.setText(Menu.names[players.get(1).getCh()] + " is aan de beurt!");
String loc = this.getClass().getResource("/music/game.mp3").toString(); String loc = this.getClass().getResource("/music/game.mp3").toString();
Media music = new Media(loc); Media music = new Media(loc);

View file

@ -14,7 +14,12 @@ import java.util.Properties;
public class Main extends Application { public class Main extends Application {
public static Scene scene; public static Scene scene;
public static boolean memes = false;
public static void main(String[] args) throws Exception { public static void main(String[] args) throws Exception {
for (String s : args) {
if (s.equals("-memes")) memes = true;
}
Properties properties = new Properties(); Properties properties = new Properties();
properties.load(Main.class.getResourceAsStream("/text/locations.properties")); properties.load(Main.class.getResourceAsStream("/text/locations.properties"));

View file

@ -61,6 +61,9 @@ public class Player {
if (roll == 4) if (roll == 4)
alert.contentTextProperty().setValue("Je hebt " + roll + " gegooid!\nKlavertje 4! Je mag dus nog een keer!"); alert.contentTextProperty().setValue("Je hebt " + roll + " gegooid!\nKlavertje 4! Je mag dus nog een keer!");
alert.titleProperty().setValue(""); alert.titleProperty().setValue("");
if (plaats + roll == 69 && Main.memes) {
alert.contentTextProperty().setValue("heheheh 69 icksdie\n" + alert.getContentText());
}
if (!Game.specials.containsKey(plaats + roll)) if (!Game.specials.containsKey(plaats + roll))
alert.show(); alert.show();
if (roll + plaats > 100) { if (roll + plaats > 100) {
@ -107,9 +110,11 @@ public class Player {
tt.play(); tt.play();
if (plaats == 100) { if (plaats == 100) {
System.out.println("Een speler heeft gewonnen!"); System.out.println("Een speler heeft gewonnen!");
Alert alert2 = new Alert(Alert.AlertType.WARNING, "Speler " + Menu.names[getCh()], ButtonType.OK);
alert2.show();
} }
} }

View file

Before

Width:  |  Height:  |  Size: 1.8 MiB

After

Width:  |  Height:  |  Size: 1.8 MiB

View file

@ -0,0 +1,14 @@
5=10
7=4
18=13
20=27
30=24
42=88
50=43
57=65
63=52
71=62
80=82
88=87
92=97
98=90