diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000..112cf6b Binary files /dev/null and b/.DS_Store differ diff --git a/Jackaroo/.DS_Store b/Jackaroo/.DS_Store new file mode 100644 index 0000000..3de7227 Binary files /dev/null and b/Jackaroo/.DS_Store differ diff --git a/Jackaroo/src/.DS_Store b/Jackaroo/src/.DS_Store new file mode 100644 index 0000000..641aeb6 Binary files /dev/null and b/Jackaroo/src/.DS_Store differ 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); + } + +}