From af331170a88e8ddb7265487dd53066a11dc15e20 Mon Sep 17 00:00:00 2001 From: Dennis Weinberger Date: Tue, 26 Mar 2019 17:02:54 +0000 Subject: [PATCH] Update JokerPanel.java --- Projektgruppe_175/src/gui/components/JokerPanel.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Projektgruppe_175/src/gui/components/JokerPanel.java b/Projektgruppe_175/src/gui/components/JokerPanel.java index 3ff5bbf..1e6dd61 100644 --- a/Projektgruppe_175/src/gui/components/JokerPanel.java +++ b/Projektgruppe_175/src/gui/components/JokerPanel.java @@ -21,7 +21,7 @@ public class JokerPanel extends JPanel implements MouseListener{ private GameView gv; - private enum JokerTypes { + public enum JokerTypes { ADD_TROOPS, ADD_TROOPS_USED, SCARE_TROOPS, @@ -65,6 +65,11 @@ public class JokerPanel extends JPanel implements MouseListener{ this.game = game; } + + public void setJokers(JokerTypes[] jokers) { + this.jokers = jokers; + } + /** * Associates with a map panel * @param map The map panel @@ -80,6 +85,7 @@ public class JokerPanel extends JPanel implements MouseListener{ */ private void setJoker(int index, JokerTypes j) { jokers[index] = j; + game.getCurrentPlayer().setJoker(index, j); } /**