From 7303256680cf327c37b51ecd7078f666a7294341 Mon Sep 17 00:00:00 2001 From: Simon Date: Thu, 10 Sep 2020 19:42:01 +0200 Subject: [PATCH] working on the winningProcess method of the Class Game.java --- Testing/src/Game.java | 8 ++++++-- Testing/src/Participant/Player.java | 2 +- out/production/Testing/Game.class | Bin 4577 -> 4653 bytes .../Testing/Participant/Player.class | Bin 3087 -> 3096 bytes 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Testing/src/Game.java b/Testing/src/Game.java index 6367d7f..1855220 100644 --- a/Testing/src/Game.java +++ b/Testing/src/Game.java @@ -88,7 +88,6 @@ public class Game { private void newRound(){ round++; - System.out.println(); System.out.println("----- ROUND " + round + " -----"); for (Player p: players) { p.clearHand(); @@ -124,7 +123,12 @@ public class Game { private void winningProcess(){ int highestCardIndex = -1; for (int i = 0; i < pickedCards.size(); i++) { - + if (pickedCards.get(i).getCardValue().getIndex() == 14){ + players.get(i).setTimesWon(players.get(i).getTimesWon()+1); + } + if (pickedCards.get(i).getCardType().getIndex() == leadingType){ + + } } } diff --git a/Testing/src/Participant/Player.java b/Testing/src/Participant/Player.java index 13364d9..8411a5c 100644 --- a/Testing/src/Participant/Player.java +++ b/Testing/src/Participant/Player.java @@ -47,7 +47,7 @@ public class Player { public void displayHand(){ System.out.print("Hand: "); for (int i = 0; i < hand.size(); i++) { - System.out.print("(" + (i+1) + ")" + hand.get(i).getName() + "; "); + System.out.print("(" + (i+1) + ") " + hand.get(i).getName() + "; "); } System.out.println(); } diff --git a/out/production/Testing/Game.class b/out/production/Testing/Game.class index 07bf81cd957436174f18e24e53c96eb3ac0521b5..1ca52c7122c16cbf40d1405adc85569124fbfa3b 100644 GIT binary patch delta 625 zcmXYu%TH556vlsZ@1@w=p5B6-e<3e4qbD{V~9-cO4a%awb=X>PL{j~S_KKsq)(lXGl$`!!ny&M)LLUf~xajv4cu>QbRQXb`zAUjatIg zIm*-H_Op!!G>uNo^SUJi3dg+hKnUc?gu}(N2tBf1D1WH_xY@?J@ZA8qj+TbE(F9|%u{lrl7TdNDgFeM4R vCDxp2>01uY=j0%#0~IPZctMOHH!Gq*#1gSV3@V^Pg|q_7rHzf!XbmwjB-P(A ze?t~nb>YIq#IS&^8{N~foC)2S0;|50e(DrFYkuxs&J zE4#4brmaF}=}Wb@5{D2$cCd>o>Iu_KHLdLC7<)`OaJqCK+o%=9elr_*(Nrh5dbZO* z4UHU>bUTOWBfhV*izg91BdG z6DwQp=%+;VD$a3)^O7B)Uot~-j&p%AE|K9fHyLJ*5#~j`$EfKpU#MQfmId+V#A7_? z+7rA-1fSAkR?7#^)Cd<6cqHZZSL6-j!k*wFlftp_2f}PLH?~|fn`7Rt5Cr$DhoxP{^$OuDDD?i5B>s`8)wo0 diff --git a/out/production/Testing/Participant/Player.class b/out/production/Testing/Participant/Player.class index 8e08ccea2c28a07ae7a2b26425ebb807cc773f47..6abb1b8537dbd86b23b505068426099b8ef1fe5e 100644 GIT binary patch delta 180 zcmeB|m?5#jg@u_(Q(?0kiv|nh_R0AinaWBG91IK$20+q~L6pIW!Gyt>!2?Kp1Nngr zrVQZ>W|Kd2w2N9YurOFL@Gw|2NHN$jXfxO{m@(K*?&ox8b!1>=aGHD@$Z`d;+$O7Y zxwCo#SzeQix!f3iCl_)HPd>|~$ruP`adB%hhJsn{KvpD><-!;X=AQ)e6G1FaMxd<> I3``6W0OzD5lK=n! delta 168 zcmbOs(J!&Vg@uVxbF({(1`Ff*$psvl(ozg;3=9kg3>*xG45AE14BkLGkimo@oWXSR zAC7iW3kDVjO9mbWD+VbBYX)rw8wN85+sQLH-B}$NSQ#8A8*qtF{>^E?>H_4s0(tJN z9zd2SSbQ>