diff --git a/src/main/java/solitaer/SolitaerGamePanel.java b/src/main/java/solitaer/SolitaerGamePanel.java index 5d1165f..86b40c8 100644 --- a/src/main/java/solitaer/SolitaerGamePanel.java +++ b/src/main/java/solitaer/SolitaerGamePanel.java @@ -33,7 +33,6 @@ public class SolitaerGamePanel extends JPanel { public SolitaerGamePanel() { setLayout(null); - int Offset_x_Save = setLayoutX(STARTSTACK_SIZE + 1); int Offset_y_Save = setLayouty(1); @@ -45,12 +44,10 @@ public class SolitaerGamePanel extends JPanel { save = new SaveStack(Offset_x_Save, Offset_y_Save); this.add(save); - mouseL = new MyMouseListener(save); this.addMouseListener(mouseL); deck = new CardDeck(); - System.out.println(deck.getDeck().size()); for (int i = 0; i < STARTSTACK_SIZE; i++) { int y = setLayouty(1); @@ -65,7 +62,6 @@ public class SolitaerGamePanel extends JPanel { start[i].addCard(card); this.add(start[i]); } - System.out.println(deck.getDeck().size()); for (int i = 0; i < ABLAGESTACK_SIZE; i++) { int x = setLayoutX(((STARTSTACK_SIZE - ABLAGESTACK_SIZE) + i)); @@ -92,6 +88,11 @@ public class SolitaerGamePanel extends JPanel { waste = new WasteStack(setLayoutX(1), OFFSET_STACKS_Y); geber = new GeberStack(setLayoutX(0), OFFSET_STACKS_Y, waste); + + while(deck.getDeck().size() != 0) { + geber.addCard(deck.getDeck().remove(0)); + } + this.add(waste); this.add(geber);