From 788cf4762f39e4256ddc5b03a7221507c771defc Mon Sep 17 00:00:00 2001 From: Alexander Hartung Date: Sun, 6 Feb 2022 22:55:05 +0100 Subject: [PATCH] Fix MouseInput GeberStack --- src/main/java/solitaer/MyMouseListener.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/solitaer/MyMouseListener.java b/src/main/java/solitaer/MyMouseListener.java index d222ac6..0ad21bb 100644 --- a/src/main/java/solitaer/MyMouseListener.java +++ b/src/main/java/solitaer/MyMouseListener.java @@ -118,6 +118,11 @@ public class MyMouseListener implements MouseInputListener { } else { tempStack = (GeberStack) com.getParent(); } + + if(this.saveStack.stackIsEmpty() == false) { + clearSaveStack(selectedStack); + } + if (tempStack.stackIsEmpty()) { // Move all from Waste to Geber ((GeberStack) this.tempStack).swapWasteGeber();