commit 1388ccfde60c041a402989e49872427cf51780e2 parent 33c82ddc114264c7ac86b4e9e5b7a9af50e7f751 Author: Michael Neuper <73108749+michaelneuper@users.noreply.github.com> Date: Sat, 8 Oct 2022 08:04:42 +0200 add emptyDeck and addCards methods Diffstat:
| M | src/model/Deck.java | | | 16 | ++++++++++++++++ |
1 file changed, 16 insertions(+), 0 deletions(-)
diff --git a/src/model/Deck.java b/src/model/Deck.java @@ -115,6 +115,22 @@ public class Deck { return deck.size() > 0; } + /** + * Mehtod to empty the deck + */ + public void emptyDeck() { + deck.clear(); + } + + /** + * Adds an arraylist of cards to the deck + * + * @param cards arraylist of cards to be added to deck + */ + public void addCards(ArrayList<Card> cards) { + deck.addAll(cards); + } + @Override public String toString() {