Browse Source

ADD last card to WasteStack

feature_solitaer_setup_GamePanel
Alexander Hartung 3 years ago
parent
commit
337594435a
  1. 6
      src/main/java/solitaer/SolitaerGamePanel.java

6
src/main/java/solitaer/SolitaerGamePanel.java

@ -89,10 +89,14 @@ 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) {
while(deck.getDeck().size() != 1) {
geber.addCard(deck.getDeck().remove(0));
}
Card card = deck.getDeck().remove(0);
card.setFaceUp(true);
waste.addCard(card);
this.add(waste);
this.add(geber);

Loading…
Cancel
Save