|
|
@ -105,9 +105,32 @@ public class MyMouseListener implements MouseInputListener { |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
// GeberStack |
|
|
|
else if (com.getParent() instanceof GeberStack || com instanceof GeberStack) { |
|
|
|
|
|
|
|
} |
|
|
|
System.out.println("GeberStack"); |
|
|
|
|
|
|
|
if (com instanceof GeberStack) { |
|
|
|
tempStack = (GeberStack) com; |
|
|
|
} else { |
|
|
|
tempStack = (GeberStack) com.getParent(); |
|
|
|
} |
|
|
|
|
|
|
|
if (tempStack.stackIsEmpty()) { |
|
|
|
// Move all from Waste to Geber |
|
|
|
((GeberStack) this.tempStack).swapWasteGeber(); |
|
|
|
} else { |
|
|
|
// Move next card to Waste |
|
|
|
tempCard = tempStack.removeLastCard(); |
|
|
|
tempCard.setFaceUp(true); |
|
|
|
((GeberStack) this.tempStack).getWastStack() |
|
|
|
.addCard(tempCard); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
private void clearSaveStack(BaseStack _ziel) { |
|
|
|
// Alles wieder auf den Ursprünglichen Stack packen |
|
|
|
while (!saveStack.stackIsEmpty()) { |
|
|
|