From 938a994fa5da7288cf843cf8c70ef2515d56af5f Mon Sep 17 00:00:00 2001 From: "s.eser" Date: Fri, 22 Mar 2024 18:05:29 +0100 Subject: [PATCH] Hand fertig implementiert. --- .../informatik/blackjack/Hand.java | 26 ++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/src/de/hs_mannheim/informatik/blackjack/Hand.java b/src/de/hs_mannheim/informatik/blackjack/Hand.java index 0476ad9..f0126b9 100644 --- a/src/de/hs_mannheim/informatik/blackjack/Hand.java +++ b/src/de/hs_mannheim/informatik/blackjack/Hand.java @@ -4,10 +4,34 @@ import java.util.ArrayList; public class Hand { - ArrayList hand = new ArrayList<>(); + private ArrayList hand = new ArrayList<>(); Hand(Kartenstapel ks){ + hand.add(ks.getKarte()); + hand.add(ks.getKarte()); + } + public String toString(){ + String hand = ""; + for (int i = 0; i