diff --git a/src/game/BaseGame.java b/src/game/BaseGame.java index 9b5e0bd..a0caebf 100644 --- a/src/game/BaseGame.java +++ b/src/game/BaseGame.java @@ -156,6 +156,9 @@ cards = new ArrayList<>(); deck = new Card[COLORS][5]; deckCounter = new int[5]; + for(int i=0; i<5; ++i){ + deckCounter[i] = 0; + } trash = new ArrayList<>(); int[] dist = new int[]{3, 2, 2, 2, 1}; int[][] tmp_cards = new int[][]{ @@ -361,7 +364,7 @@ protected void placeCard(Card c, int color, int value){ deckCounter[color]++; deck[color][value] = c; - if(value == 5) addHint(); + if(value+1 == 5) addHint(); } protected void onNext(){ diff --git a/src/game/SwingGame.java b/src/game/SwingGame.java index e6640f3..d1e9538 100644 --- a/src/game/SwingGame.java +++ b/src/game/SwingGame.java @@ -415,7 +415,8 @@ @Override protected void placeCard(Card c, int color, int value){ - deckUI[color][value].setText(value + ""); + super.placeCard(c, color, value); + deckUI[color][value].setText((value+1) + ""); deckUI[color][value].setForeground(c.getColor()); }