|
@ -65,14 +65,9 @@ public class MyMouseListener implements MouseInputListener { |
|
|
System.out.println("ERROR selectedStack in StartStack"); |
|
|
System.out.println("ERROR selectedStack in StartStack"); |
|
|
} |
|
|
} |
|
|
if (tempStack.cardCheck(tempStack.peekLastCard(), saveStack.peekLastCard())) { |
|
|
if (tempStack.cardCheck(tempStack.peekLastCard(), saveStack.peekLastCard())) { |
|
|
while (!saveStack.stackIsEmpty()) { |
|
|
|
|
|
tempStack.addCard(saveStack.removeLastCard()); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
clearSaveStack(tempStack); |
|
|
} else { |
|
|
} else { |
|
|
// Alles wieder auf den Ursprünglichen Stack packen |
|
|
|
|
|
while (!saveStack.stackIsEmpty()) { |
|
|
|
|
|
selectedStack.addCard(saveStack.removeLastCard()); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
clearSaveStack(selectedStack); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
selectedStack = null; |
|
|
selectedStack = null; |
|
@ -87,7 +82,6 @@ public class MyMouseListener implements MouseInputListener { |
|
|
tempStack = (AblageStack) com; |
|
|
tempStack = (AblageStack) com; |
|
|
} else { |
|
|
} else { |
|
|
tempStack = (AblageStack) com.getParent(); |
|
|
tempStack = (AblageStack) com.getParent(); |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (saveStack.stackIsEmpty()) { |
|
|
if (saveStack.stackIsEmpty()) { |
|
@ -105,15 +99,20 @@ public class MyMouseListener implements MouseInputListener { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} else { |
|
|
} else { |
|
|
// Alles wieder auf den Ursprünglichen Stack packen |
|
|
|
|
|
while (!saveStack.stackIsEmpty()) { |
|
|
|
|
|
selectedStack.addCard(saveStack.removeLastCard()); |
|
|
|
|
|
|
|
|
//Clear Save |
|
|
|
|
|
clearSaveStack(selectedStack); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void clearSaveStack(BaseStack _ziel) { |
|
|
|
|
|
// Alles wieder auf den Ursprünglichen Stack packen |
|
|
|
|
|
while (!saveStack.stackIsEmpty()) { |
|
|
|
|
|
_ziel.addCard(saveStack.removeLastCard()); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|