|
@ -42,7 +42,7 @@ public class SolitaerGamePanel extends JPanel { |
|
|
this.add(label); |
|
|
this.add(label); |
|
|
|
|
|
|
|
|
save = new SaveStack(Offset_x_Save, Offset_y_Save); |
|
|
save = new SaveStack(Offset_x_Save, Offset_y_Save); |
|
|
this.add(save); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mouseL = new MyMouseListener(save); |
|
|
mouseL = new MyMouseListener(save); |
|
|
this.addMouseListener(mouseL); |
|
|
this.addMouseListener(mouseL); |
|
@ -121,6 +121,7 @@ public class SolitaerGamePanel extends JPanel { |
|
|
deck.shuffelDeck(); |
|
|
deck.shuffelDeck(); |
|
|
|
|
|
|
|
|
for (int i = 0; i < STARTSTACK_SIZE; i++) { |
|
|
for (int i = 0; i < STARTSTACK_SIZE; i++) { |
|
|
|
|
|
start[i].clearStack(); |
|
|
int tmp = i; |
|
|
int tmp = i; |
|
|
while (tmp != 0) { |
|
|
while (tmp != 0) { |
|
|
start[i].addCard(deck.getDeck().remove(0)); |
|
|
start[i].addCard(deck.getDeck().remove(0)); |
|
@ -136,10 +137,12 @@ public class SolitaerGamePanel extends JPanel { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < ABLAGESTACK_SIZE; i++) { |
|
|
for (int i = 0; i < ABLAGESTACK_SIZE; i++) { |
|
|
|
|
|
ablage[i].clearStack(); |
|
|
this.add(ablage[i]); |
|
|
this.add(ablage[i]); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
geber.clearStack(); |
|
|
|
|
|
waste.clearStack(); |
|
|
while (deck.getDeck().size() != 1) { |
|
|
while (deck.getDeck().size() != 1) { |
|
|
geber.addCard(deck.getDeck().remove(0)); |
|
|
geber.addCard(deck.getDeck().remove(0)); |
|
|
} |
|
|
} |
|
@ -150,6 +153,10 @@ public class SolitaerGamePanel extends JPanel { |
|
|
|
|
|
|
|
|
this.add(waste); |
|
|
this.add(waste); |
|
|
this.add(geber); |
|
|
this.add(geber); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
save.clearStack(); |
|
|
|
|
|
this.add(save); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|