diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 1bcd01a3451e2139b8e477d4844f8fd6dfffef8e..e051867ba08f795b1217e09668bd322d4db61908 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -5,9 +5,15 @@ UNO ====== >>> start-date: 09.04.16 ->>> status-date: 10.04.16 +>>> status-date: 23.04.16 ____________________________________________________ +v.1.0.0 - (1) +=============== + +-basic implementation + +>>> end-work: 23.04.16 ____________________________________________________ diff --git a/build/UNO.exe b/build/UNO.exe new file mode 100644 index 0000000000000000000000000000000000000000..b67fe0e2368748727dacc2ba2e9f989988ae1dbe Binary files /dev/null and b/build/UNO.exe differ diff --git a/build/UNO.jar b/build/UNO.jar new file mode 100644 index 0000000000000000000000000000000000000000..e024eb2de4c1fa764cd4557219ae2944d4e21c67 Binary files /dev/null and b/build/UNO.jar differ diff --git a/build/UNO.xml b/build/UNO.xml new file mode 100644 index 0000000000000000000000000000000000000000..124a5fb8f53f006902d91fc471a2173645a6240a --- /dev/null +++ b/build/UNO.xml @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="UTF-8"?> +<launch4jConfig> + <dontWrapJar>false</dontWrapJar> + <headerType>gui</headerType> + <jar>C:\Users\Robert\Documents\eclipse\workspace\UNO\build\UNO.jar</jar> + <outfile>C:\Users\Robert\Documents\eclipse\workspace\UNO\build\UNO.exe</outfile> + <errTitle></errTitle> + <cmdLine></cmdLine> + <chdir>.</chdir> + <priority>normal</priority> + <downloadUrl>http://java.com/download</downloadUrl> + <supportUrl></supportUrl> + <stayAlive>false</stayAlive> + <restartOnCrash>false</restartOnCrash> + <manifest></manifest> + <icon>C:\Users\Robert\Documents\eclipse\workspace\UNO\build\icon.ico</icon> + <classPath> + <mainClass>application.Main</mainClass> + <cp>.</cp> + </classPath> + <jre> + <path></path> + <bundledJre64Bit>false</bundledJre64Bit> + <bundledJreAsFallback>false</bundledJreAsFallback> + <minVersion>1.8.0</minVersion> + <maxVersion></maxVersion> + <jdkPreference>preferJre</jdkPreference> + <runtimeBits>64/32</runtimeBits> + </jre> +</launch4jConfig> \ No newline at end of file diff --git a/build/icon.ico b/build/icon.ico new file mode 100644 index 0000000000000000000000000000000000000000..f604f6db4e25966819aec44a82e9514dcd4488c1 Binary files /dev/null and b/build/icon.ico differ diff --git a/class/application/Controller$1.class b/class/application/Controller$1.class index aed693d061b56373910fef0093842d3cb06818ae..14ed6b8e80e5c4d4891bf3dce388576e82e452ad 100644 Binary files a/class/application/Controller$1.class and b/class/application/Controller$1.class differ diff --git a/class/application/Controller$2.class b/class/application/Controller$2.class index 12288a7b9eef46237ca681dd56214c213533d04e..c817c8bff08ffebfca784208764feb1e71ef913e 100644 Binary files a/class/application/Controller$2.class and b/class/application/Controller$2.class differ diff --git a/class/application/Controller$3.class b/class/application/Controller$3.class index 674254581b6d0aeb10231e38784e9de13bf2f86d..cb09ad2228fd51b5be495c3f74989d99b9c7bb93 100644 Binary files a/class/application/Controller$3.class and b/class/application/Controller$3.class differ diff --git a/class/application/Controller$4.class b/class/application/Controller$4.class index 0e30c9ad4c45e9cd5c37fe6434f78c6d976ff278..7be8cd0c2a6105a68c88d0b381c75b09f16461ad 100644 Binary files a/class/application/Controller$4.class and b/class/application/Controller$4.class differ diff --git a/class/application/Controller$5.class b/class/application/Controller$5.class index 26f7432484944012f45cea7dd64a0eb14635bc7c..83f1dbfbb51488b8d6e32f2a039e718e05835828 100644 Binary files a/class/application/Controller$5.class and b/class/application/Controller$5.class differ diff --git a/class/application/Controller$6.class b/class/application/Controller$6.class index 97f1ac5053f5c71bd2e7e2dcee605151db956933..e72b11fa01003560ce841eae7af162e1138aa8da 100644 Binary files a/class/application/Controller$6.class and b/class/application/Controller$6.class differ diff --git a/class/application/Controller$7.class b/class/application/Controller$7.class index d3e23cf54407d61444c35300d79a4a8fbc069b41..da4393d2da8f308283fe5e903bfc08c0b50d7775 100644 Binary files a/class/application/Controller$7.class and b/class/application/Controller$7.class differ diff --git a/class/application/Controller$8.class b/class/application/Controller$8.class index 140a01e8ff74ecc69b328e2a0066f2fd0b120444..6fa0e6dc2b31d9564ec196ef51aa2b2d7c82e09d 100644 Binary files a/class/application/Controller$8.class and b/class/application/Controller$8.class differ diff --git a/class/application/Controller$9.class b/class/application/Controller$9.class index 3b2a5cbd888c58f847cf613cfe5ff78fad649edf..5323d476f21a32bf359811e493ecfcd095aa42f3 100644 Binary files a/class/application/Controller$9.class and b/class/application/Controller$9.class differ diff --git a/class/application/Controller.class b/class/application/Controller.class index d8117d6ec6fca5287b61b44ff07823a065014574..249cfc6872d2cf03b4be39a24bee0bad472adc83 100644 Binary files a/class/application/Controller.class and b/class/application/Controller.class differ diff --git a/class/application/Main$1.class b/class/application/Main$1.class new file mode 100644 index 0000000000000000000000000000000000000000..2ac13e565da71591a65094b4b015f1dfc74bfd9a Binary files /dev/null and b/class/application/Main$1.class differ diff --git a/class/application/Main.class b/class/application/Main.class index dabd9a0e1d264556eddbc6eaa71c216e4edd1674..0eb546a324fe077cffb18bf2ce74ff197356e6d1 100644 Binary files a/class/application/Main.class and b/class/application/Main.class differ diff --git a/class/application/_de.properties b/class/application/_de.properties index 281e7a9d5be2f008e8d7b634a7df2b5dbabf08d0..1f94040dc28a05b09e3240cf9a5c7a62b3e7ebae 100644 --- a/class/application/_de.properties +++ b/class/application/_de.properties @@ -1,4 +1,4 @@ app.name=UNO -version.code=0 -version.name=0.0.0 -version.date=10.04.16 \ No newline at end of file +version.code=1 +version.name=1.0.0 +version.date=23.04.16 \ No newline at end of file diff --git a/class/logic/Game.class b/class/logic/Game.class index 5a0566118e9f6e4e7d8e84f1a82f03597e1ff95c..e45bf14a5786795e43bae92f336c649012f9e37a 100644 Binary files a/class/logic/Game.class and b/class/logic/Game.class differ diff --git a/src/application/Controller.java b/src/application/Controller.java index 52c0a8a288768ce6e427f427b5ecc0ff6e69a89c..f834fc70cb60a89f287bbd89c7433b08d67726e2 100644 --- a/src/application/Controller.java +++ b/src/application/Controller.java @@ -83,6 +83,7 @@ public class Controller public AchievementHandler handler; private int secretCounter; private boolean playerHasDrawn; + public boolean playerMustChallenge; public Stage stage; public Image icon = new Image("images/icon.png"); @@ -190,6 +191,8 @@ public class Controller drawCounter = 0; playerHasDrawn = false; + playerMustChallenge = false; + labelCurrentPlayer.setVisible(true); labelCurrentPlayer.setText(""); @@ -199,9 +202,10 @@ public class Controller @Override public void handle(MouseEvent event) { - if(game.isRunning() && game.getCurrentPlayer() == 1 && !game.isShowingInfo() && !playerHasDrawn) - { + if(game.isRunning() && game.getCurrentPlayer() == 1 && !game.isShowingInfo() && !playerHasDrawn && !playerMustChallenge) + { playerHasDrawn = true; + playerMustChallenge = false; Card drawedCard = game.getDeck().drawCard(game.getDeadDeck()); ArrayList<Card> allCards = new ArrayList<Card>(); allCards.add(drawedCard); @@ -990,7 +994,7 @@ public class Controller switch(ai.getID()) { - case 1: maxWidth = stage.getScene().getWidth() - ((AI_1_STARTING_POINT.getX() + 25.0) * 2) - CARD_WIDTH; + case 1: maxWidth = stage.getScene().getWidth() - ((AI_1_STARTING_POINT.getX() + 0.0) * 2) - CARD_WIDTH; deckSize = ai.getDeckSize(); if(i == 0) diff --git a/src/application/Main.java b/src/application/Main.java index 287fcb504addbe07651ed0d840e2e2a1aa509e61..ccc76a3e5d3966fc37b7f9ca7562048e949c1f1b 100644 --- a/src/application/Main.java +++ b/src/application/Main.java @@ -1,12 +1,15 @@ package application; +import achievements.Achievement.Status; import javafx.application.Application; +import javafx.event.EventHandler; import javafx.fxml.FXMLLoader; import javafx.scene.Parent; import javafx.scene.Scene; import javafx.scene.SceneAntialiasing; import javafx.scene.image.Image; import javafx.stage.Stage; +import javafx.stage.WindowEvent; public class Main extends Application { @@ -27,9 +30,34 @@ public class Main extends Application Controller controller = (Controller)loader.getController(); controller.setStage(stage); - controller.init(); + controller.init(); + + stage.setOnCloseRequest(new EventHandler<WindowEvent>() + { + @Override + public void handle(WindowEvent event) + { + try + { + if(controller.handler.getAchievements().get(3).getStatus().equals(Status.LOCKED)) + { + controller.handler.resetAchievement(3); + } + if(controller.handler.getAchievements().get(4).getStatus().equals(Status.LOCKED)) + { + controller.handler.resetAchievement(4); + } + controller.handler.saveAndLoad(); + } + catch(Exception e) + { + } + } + }); + + + - //TODO set minWidth and Height stage.getIcons().add(new Image("images/icon.png")); stage.show(); } diff --git a/src/application/_de.properties b/src/application/_de.properties index 281e7a9d5be2f008e8d7b634a7df2b5dbabf08d0..1f94040dc28a05b09e3240cf9a5c7a62b3e7ebae 100644 --- a/src/application/_de.properties +++ b/src/application/_de.properties @@ -1,4 +1,4 @@ app.name=UNO -version.code=0 -version.name=0.0.0 -version.date=10.04.16 \ No newline at end of file +version.code=1 +version.name=1.0.0 +version.date=23.04.16 \ No newline at end of file diff --git a/src/logic/Game.java b/src/logic/Game.java index 3eb5cdab5cac0dfce185438b25b7e86830643475..6ab42d7d217023827797ca02940f7843a8455835 100644 --- a/src/logic/Game.java +++ b/src/logic/Game.java @@ -172,7 +172,14 @@ public class Game { controller.setLabelCurrentPlayer(player.getName() + " ist am Zug"); - controller.setValidPlayerDeck(player.getDeck(), player.getValidCards(lastCard, wishColor, challenge)); + ArrayList<Card> validDeck = player.getValidCards(lastCard, wishColor, challenge); + controller.setValidPlayerDeck(player.getDeck(), validDeck); + + controller.playerMustChallenge = false; + if(challenge && validDeck.size() > 0) + { + controller.playerMustChallenge = true; + } player.turn(lastCard, wishColor, challenge); }