From bee12748e7fbc16260c0b4005714b12a139a96a9 Mon Sep 17 00:00:00 2001 From: wafialwakil Date: Sun, 3 Mar 2024 12:02:52 +0100 Subject: [PATCH] =?UTF-8?q?Infrastructur=20=C3=84nderungen.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .DS_Store | Bin 0 -> 6148 bytes Jackaroo/.DS_Store | Bin 0 -> 6148 bytes Jackaroo/src/.DS_Store | Bin 0 -> 6148 bytes Jackaroo/src/Infrastructur/Card.java | 25 ++++++++++++++++++++ Jackaroo/src/Infrastructur/CardKind.java | 7 ++++++ Jackaroo/src/Infrastructur/Deck.java | 19 +++++++++++++++ Jackaroo/src/Infrastructur/NormalCard.java | 14 +++++++++++ Jackaroo/src/Infrastructur/SpecialCard.java | 13 ++++++++++ 8 files changed, 78 insertions(+) create mode 100644 .DS_Store create mode 100644 Jackaroo/.DS_Store create mode 100644 Jackaroo/src/.DS_Store create mode 100644 Jackaroo/src/Infrastructur/Card.java create mode 100644 Jackaroo/src/Infrastructur/CardKind.java create mode 100644 Jackaroo/src/Infrastructur/Deck.java create mode 100644 Jackaroo/src/Infrastructur/NormalCard.java create mode 100644 Jackaroo/src/Infrastructur/SpecialCard.java diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..112cf6b44720c50d255028c29212d0ef6584bc65 GIT binary patch literal 6148 zcmeHK%}T>S5T0$TZV;gdg&r5Y7Og*s#Y?Pu(4!GOsMN$14aThW#~w-{XMG``#MjZ8 z-EBcykBXHUnE58NGfDQ_u$ut@(dfk+0A&D>sDuR%%@m<=(g`WJND)z(dxX#i4f;6M zw-ebM_=^nC+DSNp5N_cC?Rfp7R7W^QAI3iF+J_PJrsPNc&Xdc3i=NV?)2-FsMWI-l zn_rL%a#3Cf_qrc+!)~wB2-}x*b*6P1jr=e=Pg?zEdHFzR-7v{oZBvlMEljz(NU~V> z8@iXp9a9_F0qIGvS*{EQoAsTl+N$pkt7=f+tX0+a*3NL~$(7ahz0>AH`k3h#^X4G% zJ2kT8a0IXDOz`j=w6j!acQ`hx8|5=H1Iz$3Fv|?MJxwmo@+A1(nE__tM;M^}L7@`* z4s(lU>p){#0K^i8ji67zj8vl>`VMo8ID#TnHm4xzgi{lb>%u$TFbQD)mjbL1ngXlZVEn)91@6?Nt8DIvOfmLL{oMl#V6H)u)TP^HfR z?i6~AeX1y<11c$5@pcW4fFtm~5#Y6Zlb%yVM>L_u^{cRwBTBK7OZq-c)j^!97~Z^9 zJVCnmOB+g;8X=w*$99C%_&809ve!Ektu^o3^>u&U-|#<%U)3}$qp~UnQU0E5ua!#U z^KulwO(xS(=hjn|l~IySavhM2Cvf@jF3HAfI#5+ME_7^YI{dcZ9(A^6v+e$FSMKy5 z&AW2e-|ltg!=2svyzSqrR7pYzlc|~YmFvA8#k6z%b8`8^VX5vnRS&QD#u;Ih+ zZILUg&OpF^=l+JH;RrYajzEI|?++4*HLzM6)msNLeFcDeXx4@@{~&OTv>I5gjiLu8 zOeoZZ3VX#6CLHb3`UO^Nqb8h$y?hA!WMOY8LO&hjOYKe~FzRwgz!6v`ux6?qKL4Nn z{rQIY+acgpS2R{6A~Ny)kbv)GJ72B0w2X&NZQaRxd08U T)<)3+b3XzagUcL&e@fst>LJWp literal 0 HcmV?d00001 diff --git a/Jackaroo/src/Infrastructur/Card.java b/Jackaroo/src/Infrastructur/Card.java new file mode 100644 index 0000000..0b28410 --- /dev/null +++ b/Jackaroo/src/Infrastructur/Card.java @@ -0,0 +1,25 @@ +package Infrastructur; + +public class Card { + + private int wert; + private CardKind kartenTyp; + + public void setWert(int wert) { + this.wert = wert; + } + + public void setKartenTyp(CardKind kartenTyp) { + this.kartenTyp = kartenTyp; + } + + public int getWert() { + return wert; + } + + public CardKind getKartenTyp() { + return kartenTyp; + } + + +} diff --git a/Jackaroo/src/Infrastructur/CardKind.java b/Jackaroo/src/Infrastructur/CardKind.java new file mode 100644 index 0000000..88a6521 --- /dev/null +++ b/Jackaroo/src/Infrastructur/CardKind.java @@ -0,0 +1,7 @@ +package Infrastructur; + +public enum CardKind { + + TWO, THREE, FOUR, FIVE, SIX, SEVEN, EIGHT, NINE, TEN, JACK, QUEEN, KING, ACE + +} diff --git a/Jackaroo/src/Infrastructur/Deck.java b/Jackaroo/src/Infrastructur/Deck.java new file mode 100644 index 0000000..3018ecd --- /dev/null +++ b/Jackaroo/src/Infrastructur/Deck.java @@ -0,0 +1,19 @@ +package Infrastructur; + +import java.util.ArrayList; +import java.util.List; + +public class Deck extends Card{ + + private List deck; + + public Deck() { + deck = new ArrayList<>(); + for (CardKind kartenTyp : CardKind.values()) { + for (int i = 0; i < 4; i++) { + deck.add(new Card()); + } + } + } + +} diff --git a/Jackaroo/src/Infrastructur/NormalCard.java b/Jackaroo/src/Infrastructur/NormalCard.java new file mode 100644 index 0000000..5170127 --- /dev/null +++ b/Jackaroo/src/Infrastructur/NormalCard.java @@ -0,0 +1,14 @@ +package Infrastructur; + +public class NormalCard extends Card{ + + private CardKind[] laufKarten = {CardKind.TWO, CardKind.THREE, CardKind.SIX, CardKind.EIGHT, CardKind.NINE, + CardKind.QUEEN}; + + public NormalCard(CardKind kartenTyp) { + setKartenTyp(kartenTyp); + // Setze den Wert basierend auf dem KartenTyp (z.B., TWO = 2, THREE = 3, etc.) + setWert(kartenTyp.ordinal() + 2); + } + +} diff --git a/Jackaroo/src/Infrastructur/SpecialCard.java b/Jackaroo/src/Infrastructur/SpecialCard.java new file mode 100644 index 0000000..d99532a --- /dev/null +++ b/Jackaroo/src/Infrastructur/SpecialCard.java @@ -0,0 +1,13 @@ +package Infrastructur; + +public class SpecialCard extends Card{ + + private CardKind[] eigenschaftKarten = {CardKind.FOUR, CardKind.FIVE, CardKind.SEVEN, CardKind.TEN, + CardKind.JACK, CardKind.KING, CardKind.ACE}; + + + public SpecialCard(CardKind kartenTyp) { + setKartenTyp(kartenTyp); + } + +}