Update JokerPanel.java

This commit is contained in:
Dennis Weinberger 2019-03-26 17:02:54 +00:00
parent 851d7b8f46
commit af331170a8

View file

@ -21,7 +21,7 @@ public class JokerPanel extends JPanel implements MouseListener{
private GameView gv; private GameView gv;
private enum JokerTypes { public enum JokerTypes {
ADD_TROOPS, ADD_TROOPS,
ADD_TROOPS_USED, ADD_TROOPS_USED,
SCARE_TROOPS, SCARE_TROOPS,
@ -65,6 +65,11 @@ public class JokerPanel extends JPanel implements MouseListener{
this.game = game; this.game = game;
} }
public void setJokers(JokerTypes[] jokers) {
this.jokers = jokers;
}
/** /**
* Associates with a map panel * Associates with a map panel
* @param map The 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) { private void setJoker(int index, JokerTypes j) {
jokers[index] = j; jokers[index] = j;
game.getCurrentPlayer().setJoker(index, j);
} }
/** /**