commit ade102a98a2cf21ae22b0a7d8cc6c16890f4c773 parent aa1b16d7e9c83234b8cff0df897235a1c0cbbde6 Author: Michael Neuper <73108749+michaelneuper@users.noreply.github.com> Date: Fri, 7 Oct 2022 21:21:28 +0200 add hasCards method Diffstat:
| M | src/model/Deck.java | | | 10 | ++++++++++ |
1 file changed, 10 insertions(+), 0 deletions(-)
diff --git a/src/model/Deck.java b/src/model/Deck.java @@ -105,6 +105,16 @@ public class Deck { return cardToTake; } + /** + * Method to make sure the deck we're hitting from has cards in it + * + * @return true (if the deck has cards in) + * @return false (if the deck is empty) + */ + public boolean hasCards() { + return deck.size() > 0; + } + @Override public String toString() {