/** * ******************************************** to undo this move we must put the cards back IN * THE ORDER they were extracted. */ public boolean undo(Solitaire theGame) { // VALIDATE: if ((discardsCard == null) || (drawnCard == null)) return false; // EXECUTE: if (!wasDiscardsEmpty) { discards.add(justDrawn.get()); } discards.add(discardsCard); justDrawn.add(drawnCard); theGame.updateScore(-2); return true; }