From 25f30237d28014dbfb8da9b09aecedb72b9120e7 Mon Sep 17 00:00:00 2001 From: Alexander Hartung Date: Fri, 21 Jan 2022 14:18:17 +0100 Subject: [PATCH 01/54] init GameWindow --- .gitignore | 22 +++++++++++++++ src/main/java/hauptmenue/GameWindow.java | 27 ++++++++++++++++++ src/main/java/hauptmenue/main.java | 10 +++++++ src/main/java/solitaer/SolitaerGamePanel.java | 28 +++++++++++++++++++ 4 files changed, 87 insertions(+) create mode 100644 src/main/java/hauptmenue/GameWindow.java create mode 100644 src/main/java/hauptmenue/main.java create mode 100644 src/main/java/solitaer/SolitaerGamePanel.java diff --git a/.gitignore b/.gitignore index 84adb3f..c837958 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,25 @@ # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml hs_err_pid* + +### Maven ### +target/ +pom.xml.tag +pom.xml.releaseBackup +pom.xml.versionsBackup +pom.xml.next +release.properties +dependency-reduced-pom.xml +buildNumber.properties +.mvn/timing.properties +# https://github.com/takari/maven-wrapper#usage-without-binary-jar +.mvn/wrapper/maven-wrapper.jar + +# Eclipse m2e generated files +# Eclipse Core +.project +# JDT-specific (Eclipse Java Development Tools) +.classpath + +# End of https://www.toptal.com/developers/gitignore/api/maven + diff --git a/src/main/java/hauptmenue/GameWindow.java b/src/main/java/hauptmenue/GameWindow.java new file mode 100644 index 0000000..a2c7479 --- /dev/null +++ b/src/main/java/hauptmenue/GameWindow.java @@ -0,0 +1,27 @@ +package hauptmenue; + +import java.awt.Dimension; + +import javax.swing.JFrame; + +import solitaer.SolitaerGamePanel; + +public class GameWindow extends JFrame { + + /** + * + */ + private static final long serialVersionUID = 1L; + private final SolitaerGamePanel gamePanel = new SolitaerGamePanel(); + + public GameWindow() { + setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); + gamePanel.setPreferredSize(new Dimension(1180, 780)); + + add(gamePanel); + pack(); + + setVisible(true); + } + +} diff --git a/src/main/java/hauptmenue/main.java b/src/main/java/hauptmenue/main.java new file mode 100644 index 0000000..3f53c7f --- /dev/null +++ b/src/main/java/hauptmenue/main.java @@ -0,0 +1,10 @@ +package hauptmenue; + +public class main { + + public static void main(String[] args) { + // TODO Auto-generated method stub + new GameWindow(); + } + +} diff --git a/src/main/java/solitaer/SolitaerGamePanel.java b/src/main/java/solitaer/SolitaerGamePanel.java new file mode 100644 index 0000000..3fa1888 --- /dev/null +++ b/src/main/java/solitaer/SolitaerGamePanel.java @@ -0,0 +1,28 @@ +package solitaer; + +import java.awt.Color; +import java.awt.Graphics; + +import javax.swing.JPanel; + +public class SolitaerGamePanel extends JPanel { + + /** + * + */ + private static final long serialVersionUID = 1L; + + + public SolitaerGamePanel() { + setLayout(null); + } + + + @Override + protected void paintComponent(Graphics g) { + // TODO Auto-generated method stub + super.paintComponent(g); + g.setColor(Color.green); + g.fillRect(0, 0, this.getWidth(), this.getHeight()); + } +} From 9346c4222389381a0b320b7d03f6b4b7e7cfc44a Mon Sep 17 00:00:00 2001 From: Alexander Hartung Date: Fri, 21 Jan 2022 16:11:22 +0100 Subject: [PATCH 02/54] implement CardDeck with 52 Cards --- src/main/java/solitaer/Card.java | 28 ++++++++++++++++++++++++ src/main/java/solitaer/CardDeck.java | 23 +++++++++++++++++++ src/test/java/solitaer/CardDeckTest.java | 21 ++++++++++++++++++ 3 files changed, 72 insertions(+) create mode 100644 src/main/java/solitaer/Card.java create mode 100644 src/main/java/solitaer/CardDeck.java create mode 100644 src/test/java/solitaer/CardDeckTest.java diff --git a/src/main/java/solitaer/Card.java b/src/main/java/solitaer/Card.java new file mode 100644 index 0000000..38bb04d --- /dev/null +++ b/src/main/java/solitaer/Card.java @@ -0,0 +1,28 @@ +package solitaer; + +import javax.swing.JPanel; + +enum Symbol { + Herz, Karo, Kreuz, Pik +} + +public class Card extends JPanel { + + /** + * + */ + private static final long serialVersionUID = 1L; + private int nr; + private Symbol symbol; + + private boolean faceUp; + + public Card(int nr, Symbol symbol, boolean faceUp) { + this.nr = nr; + this.symbol = symbol; + this.faceUp = faceUp; + } + + + +} diff --git a/src/main/java/solitaer/CardDeck.java b/src/main/java/solitaer/CardDeck.java new file mode 100644 index 0000000..522a7fd --- /dev/null +++ b/src/main/java/solitaer/CardDeck.java @@ -0,0 +1,23 @@ +package solitaer; + +import java.util.ArrayList; + +public class CardDeck { + + private ArrayList deck = new ArrayList(); + + + public CardDeck() { + for(int i= 0; i<52; i++) { + deck.add(new Card(i, Symbol.Herz, false)); + } + + } + + + public ArrayList getDeck() { + return deck; + } + + +} diff --git a/src/test/java/solitaer/CardDeckTest.java b/src/test/java/solitaer/CardDeckTest.java new file mode 100644 index 0000000..751c85d --- /dev/null +++ b/src/test/java/solitaer/CardDeckTest.java @@ -0,0 +1,21 @@ +package solitaer; + +import static org.junit.jupiter.api.Assertions.*; + +import org.junit.jupiter.api.Test; + +class CardDeckTest { + + @Test + void testCardDeckSize() { + CardDeck deck = new CardDeck(); + + int result = deck.getDeck().size(); + + assertEquals(52, result, "Kartendeck muss genau 52 Carden haben") ; + + } + + + +} From 84fab3b0848014d25da6c569bf0b598160d24d83 Mon Sep 17 00:00:00 2001 From: Alexander Hartung Date: Fri, 21 Jan 2022 17:14:36 +0100 Subject: [PATCH 03/54] CardDeck with different Symbole --- src/main/java/solitaer/Card.java | 23 +++++++++++++- src/main/java/solitaer/CardDeck.java | 29 +++++++++++++----- src/test/java/solitaer/CardDeckTest.java | 39 ++++++++++++++++++++++-- 3 files changed, 79 insertions(+), 12 deletions(-) diff --git a/src/main/java/solitaer/Card.java b/src/main/java/solitaer/Card.java index 38bb04d..9fed8b5 100644 --- a/src/main/java/solitaer/Card.java +++ b/src/main/java/solitaer/Card.java @@ -23,6 +23,27 @@ public class Card extends JPanel { this.faceUp = faceUp; } + public boolean isFaceUp() { + return faceUp; + } + + public void setFaceUp(boolean faceUp) { + this.faceUp = faceUp; + } + + public int getNr() { + return nr; + } + + public Symbol getSymbol() { + return symbol; + } + + @Override + public String toString() { + return "Card [nr=" + nr + ", symbol=" + symbol + ", faceUp=" + faceUp + "]"; + } + - + } diff --git a/src/main/java/solitaer/CardDeck.java b/src/main/java/solitaer/CardDeck.java index 522a7fd..1387542 100644 --- a/src/main/java/solitaer/CardDeck.java +++ b/src/main/java/solitaer/CardDeck.java @@ -3,21 +3,34 @@ package solitaer; import java.util.ArrayList; public class CardDeck { - + private ArrayList deck = new ArrayList(); - - + public CardDeck() { - for(int i= 0; i<52; i++) { - deck.add(new Card(i, Symbol.Herz, false)); + for (int j = 0; j < 4; j++) { + for (int i = 0; i < 13; i++) { + switch (j) { + case 0: + deck.add(new Card(1, Symbol.Herz, false)); + break; + case 1: + deck.add(new Card(1, Symbol.Karo, false)); + break; + case 2: + deck.add(new Card(1, Symbol.Kreuz, false)); + break; + case 3: + deck.add(new Card(1, Symbol.Pik, false)); + break; + } + + } } - - } + } public ArrayList getDeck() { return deck; } - } diff --git a/src/test/java/solitaer/CardDeckTest.java b/src/test/java/solitaer/CardDeckTest.java index 751c85d..448cc87 100644 --- a/src/test/java/solitaer/CardDeckTest.java +++ b/src/test/java/solitaer/CardDeckTest.java @@ -1,21 +1,54 @@ package solitaer; import static org.junit.jupiter.api.Assertions.*; +import static org.mockito.Mockito.verify; + +import java.util.stream.Stream; import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.Arguments; +import org.junit.jupiter.params.provider.MethodSource; class CardDeckTest { + + private CardDeck deck = new CardDeck(); @Test - void testCardDeckSize() { - CardDeck deck = new CardDeck(); - + void testCardDeckSize() { int result = deck.getDeck().size(); assertEquals(52, result, "Kartendeck muss genau 52 Carden haben") ; } + + + @ParameterizedTest + @MethodSource("testSymbole") + void testCardDeckSymbole(String msg, Symbol _sym) { + + boolean result = false; + + for(int i = 0; i testSymbole(){ + return Stream.of( + Arguments.of("Herz", Symbol.Herz), + Arguments.of("Karo", Symbol.Karo), + Arguments.of("Pik", Symbol.Pik), + Arguments.of("Kreuz",Symbol.Kreuz) + ); + + + } } From 2de3d41bfd1d4a57d6945200794323f34f249d2e Mon Sep 17 00:00:00 2001 From: Alexander Hartung Date: Fri, 21 Jan 2022 17:44:58 +0100 Subject: [PATCH 04/54] CardDeck with 13 Cards of each Symbol --- src/main/java/solitaer/Card.java | 19 +++++++++++++++++ src/main/java/solitaer/CardDeck.java | 10 ++++----- src/test/java/solitaer/CardDeckTest.java | 27 +++++++++++++++++++++++- 3 files changed, 50 insertions(+), 6 deletions(-) diff --git a/src/main/java/solitaer/Card.java b/src/main/java/solitaer/Card.java index 9fed8b5..76cc107 100644 --- a/src/main/java/solitaer/Card.java +++ b/src/main/java/solitaer/Card.java @@ -1,5 +1,7 @@ package solitaer; +import java.util.Objects; + import javax.swing.JPanel; enum Symbol { @@ -44,6 +46,23 @@ public class Card extends JPanel { return "Card [nr=" + nr + ", symbol=" + symbol + ", faceUp=" + faceUp + "]"; } + @Override + public int hashCode() { + return Objects.hash(faceUp, nr, symbol); + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + Card other = (Card) obj; + return faceUp == other.faceUp && nr == other.nr && symbol == other.symbol; + } + } diff --git a/src/main/java/solitaer/CardDeck.java b/src/main/java/solitaer/CardDeck.java index 1387542..f5036df 100644 --- a/src/main/java/solitaer/CardDeck.java +++ b/src/main/java/solitaer/CardDeck.java @@ -8,19 +8,19 @@ public class CardDeck { public CardDeck() { for (int j = 0; j < 4; j++) { - for (int i = 0; i < 13; i++) { + for (int i = 1; i <= 13; i++) { switch (j) { case 0: - deck.add(new Card(1, Symbol.Herz, false)); + deck.add(new Card(i, Symbol.Herz, false)); break; case 1: - deck.add(new Card(1, Symbol.Karo, false)); + deck.add(new Card(i, Symbol.Karo, false)); break; case 2: - deck.add(new Card(1, Symbol.Kreuz, false)); + deck.add(new Card(i, Symbol.Kreuz, false)); break; case 3: - deck.add(new Card(1, Symbol.Pik, false)); + deck.add(new Card(i, Symbol.Pik, false)); break; } diff --git a/src/test/java/solitaer/CardDeckTest.java b/src/test/java/solitaer/CardDeckTest.java index 448cc87..daa7371 100644 --- a/src/test/java/solitaer/CardDeckTest.java +++ b/src/test/java/solitaer/CardDeckTest.java @@ -1,7 +1,6 @@ package solitaer; import static org.junit.jupiter.api.Assertions.*; -import static org.mockito.Mockito.verify; import java.util.stream.Stream; @@ -50,5 +49,31 @@ class CardDeckTest { } + + @Test + void testCardDeckNumber() { + + boolean result = true; + + result = CheckAllCards(Symbol.Herz) && + CheckAllCards(Symbol.Karo) && + CheckAllCards(Symbol.Kreuz) && + CheckAllCards(Symbol.Pik); + + assertTrue(result); + } + + + private boolean CheckAllCards(Symbol _sym) { + boolean result = true; + for(int i =1; i<=13; i++) { + if(deck.getDeck().contains(new Card(i, _sym, false))== false) { + result = false; + break; + } + } + return result; + } + } From a10127d1b227a91831a48e2bbb2c2ef603b71c87 Mon Sep 17 00:00:00 2001 From: Alexander Hartung Date: Wed, 26 Jan 2022 14:36:44 +0100 Subject: [PATCH 05/54] Refactor CardDeck and CardDeckTest --- src/main/java/solitaer/CardDeck.java | 14 +++++++------- src/test/java/solitaer/CardDeckTest.java | 10 ++++++---- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/src/main/java/solitaer/CardDeck.java b/src/main/java/solitaer/CardDeck.java index f5036df..41a6518 100644 --- a/src/main/java/solitaer/CardDeck.java +++ b/src/main/java/solitaer/CardDeck.java @@ -7,20 +7,20 @@ public class CardDeck { private ArrayList deck = new ArrayList(); public CardDeck() { - for (int j = 0; j < 4; j++) { - for (int i = 1; i <= 13; i++) { - switch (j) { + for (int symboleZähler = 0; symboleZähler < 4; symboleZähler++) { + for (int nrZähler = 1; nrZähler <= 13; nrZähler++) { + switch (symboleZähler) { case 0: - deck.add(new Card(i, Symbol.Herz, false)); + deck.add(new Card(nrZähler, Symbol.Herz, false)); break; case 1: - deck.add(new Card(i, Symbol.Karo, false)); + deck.add(new Card(nrZähler, Symbol.Karo, false)); break; case 2: - deck.add(new Card(i, Symbol.Kreuz, false)); + deck.add(new Card(nrZähler, Symbol.Kreuz, false)); break; case 3: - deck.add(new Card(i, Symbol.Pik, false)); + deck.add(new Card(nrZähler, Symbol.Pik, false)); break; } diff --git a/src/test/java/solitaer/CardDeckTest.java b/src/test/java/solitaer/CardDeckTest.java index daa7371..48776f9 100644 --- a/src/test/java/solitaer/CardDeckTest.java +++ b/src/test/java/solitaer/CardDeckTest.java @@ -24,12 +24,13 @@ class CardDeckTest { @ParameterizedTest @MethodSource("testSymbole") + //Jedes Symbol muss einmal vorhand sein void testCardDeckSymbole(String msg, Symbol _sym) { boolean result = false; - for(int i = 0; i Date: Wed, 26 Jan 2022 15:31:53 +0100 Subject: [PATCH 06/54] init startStack --- src/main/java/solitaer/SolitaerGamePanel.java | 2 ++ src/main/java/solitaer/StartStack.java | 34 ++++++++++++++++++ src/main/java/solitaer/images/back.png | Bin 0 -> 1361 bytes 3 files changed, 36 insertions(+) create mode 100644 src/main/java/solitaer/StartStack.java create mode 100644 src/main/java/solitaer/images/back.png diff --git a/src/main/java/solitaer/SolitaerGamePanel.java b/src/main/java/solitaer/SolitaerGamePanel.java index 3fa1888..520ae04 100644 --- a/src/main/java/solitaer/SolitaerGamePanel.java +++ b/src/main/java/solitaer/SolitaerGamePanel.java @@ -15,6 +15,8 @@ public class SolitaerGamePanel extends JPanel { public SolitaerGamePanel() { setLayout(null); + StartStack a = new StartStack(25,25); + this.add(a); } diff --git a/src/main/java/solitaer/StartStack.java b/src/main/java/solitaer/StartStack.java new file mode 100644 index 0000000..79b3242 --- /dev/null +++ b/src/main/java/solitaer/StartStack.java @@ -0,0 +1,34 @@ +package solitaer; + +import java.awt.Graphics; +import java.awt.Image; +import java.util.ArrayList; + +import javax.swing.ImageIcon; +import javax.swing.JPanel; + +public class StartStack extends JPanel { + + private static final long serialVersionUID = 1L; + private Image im; + private ArrayList Stack = new ArrayList(); + + + + public StartStack(int _x, int _y) { + super.setLocation(_x, _y); + super.setSize(72,450); + super.setOpaque(false); + super.setLayout(null); + } + + @Override + protected void paintComponent(Graphics g) { + // TODO Auto-generated method stub + super.paintComponent(g); + ImageIcon ii = new ImageIcon(getClass().getResource("images/back.png")); + im = ii.getImage(); + g.drawImage(im, 0, 0, this.getWidth(), 96, this); + } + +} diff --git a/src/main/java/solitaer/images/back.png b/src/main/java/solitaer/images/back.png new file mode 100644 index 0000000000000000000000000000000000000000..9457b3025989f05a6724f9688f0e4b4007b5030b GIT binary patch literal 1361 zcmV-X1+MyuP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D1m;OZK~#8N?V7DZ zD?1Q?E0M@bB#(eZRw8+X%1RuPN2o;d2uLIn$s-_+9>))fLA0 z$9B8L%K^{N&*aY7f4|@3wF7LNEJRG&Wdd~rvCGR#jFH?PvS@f7UI+krAC0|1Lnx+6 zmuKWg#1h*RE*fC(B=Y(-g_y;Fkz3dpiQ*v@B0WzTEkTVKaC8d;>BXcw!`u32%z6(^n-mZD)2z~B}pt#ZZT$`Yf9<@@`4x7*=| z50pkAtistS)sJ$;y6gFLCx)_#Knea66Tc`teAO9q^P31fULNVA{2#6Qz z040db=E^UUo&gSh6Q-GHa*zsl#PO+{RJf&LBu*1CX>IUBwj9JWz*AX=K)o2-RFaYh z-B>Y05yo3<*ct*`fts-B_Vo0GAF5bQ!*ofbq9`UmOG;^*E;dow3XG|BiyO5vUD9D? zh-r6=a|PHI!G z<*Kv@rLo>HQ3TPgl@idQ{8*@4+m|n()nR3Ty0yv`5YNCqN*?OgHX{4CKU zO^YdJU>Y12__u0K*jEl_XYon}abE#FtuRY5c-=%C^u&n@fMH>DV{_H5ucSngoh^2A zyG2^7Pr4)}fF0>&Zt=kAkgG)PrT0|j#%|cuxyrUvc26^IY+p@kRj=d`-J};w^UF$_ zw32N%c{d2up|8?DfKACm-QsjrJ|JdlCC||f!o|-s{9}PcHzm*D#kDcYUq3h z8W^@57pq{-KFml9|HF;tgg&<8RQLVZYx)%e6A8S!*fO4aUaX+Z&{1v)No+T;Ph-tk>)9b_)?O+({YSzP`R*US6P2 zZfI%~G`T2==Efe&)y}f;Sc!2jW zn1Og@`7}P?X2qY|GWm0x4P~!;?lbNiD&S6J^B2~6;oQ!_B*wXAzoE_tUtC#^{TAyr z{Ez&Tu&`ND#Gl(T8M&Rw==Y%3K`j17lVyWuXL-b-S#Sm{ee`?&H?!od`2GD4F1)}x Tv1aIi00000NkvXXu0mjfOWB0! literal 0 HcmV?d00001 From cd0645ba09e538137cf121cb7765a393d1ae0eee Mon Sep 17 00:00:00 2001 From: Alexander Hartung Date: Wed, 26 Jan 2022 16:32:36 +0100 Subject: [PATCH 07/54] implement render for cards and ADD image files for cards --- src/main/java/solitaer/Card.java | 56 +++++++++++++++++- src/main/java/solitaer/SolitaerGamePanel.java | 2 + src/main/java/solitaer/StartStack.java | 29 ++++++--- src/main/java/solitaer/images/01Herz.png | Bin 0 -> 523 bytes src/main/java/solitaer/images/01Karo.png | Bin 0 -> 539 bytes src/main/java/solitaer/images/01Kreuz.png | Bin 0 -> 564 bytes src/main/java/solitaer/images/01Pik.png | Bin 0 -> 506 bytes src/main/java/solitaer/images/02Herz.png | Bin 0 -> 530 bytes src/main/java/solitaer/images/02Karo.png | Bin 0 -> 546 bytes src/main/java/solitaer/images/02Kreuz.png | Bin 0 -> 574 bytes src/main/java/solitaer/images/02Pik.png | Bin 0 -> 517 bytes src/main/java/solitaer/images/03Herz.png | Bin 0 -> 532 bytes src/main/java/solitaer/images/03Karo.png | Bin 0 -> 547 bytes src/main/java/solitaer/images/03Kreuz.png | Bin 0 -> 576 bytes src/main/java/solitaer/images/03Pik.png | Bin 0 -> 518 bytes src/main/java/solitaer/images/04Herz.png | Bin 0 -> 530 bytes src/main/java/solitaer/images/04Karo.png | Bin 0 -> 547 bytes src/main/java/solitaer/images/04Kreuz.png | Bin 0 -> 574 bytes src/main/java/solitaer/images/04Pik.png | Bin 0 -> 516 bytes src/main/java/solitaer/images/05Herz.png | Bin 0 -> 531 bytes src/main/java/solitaer/images/05Karo.png | Bin 0 -> 548 bytes src/main/java/solitaer/images/05Kreuz.png | Bin 0 -> 575 bytes src/main/java/solitaer/images/05Pik.png | Bin 0 -> 519 bytes src/main/java/solitaer/images/06Herz.png | Bin 0 -> 540 bytes src/main/java/solitaer/images/06Karo.png | Bin 0 -> 555 bytes src/main/java/solitaer/images/06Kreuz.png | Bin 0 -> 584 bytes src/main/java/solitaer/images/06Pik.png | Bin 0 -> 527 bytes src/main/java/solitaer/images/07Herz.png | Bin 0 -> 525 bytes src/main/java/solitaer/images/07Karo.png | Bin 0 -> 542 bytes src/main/java/solitaer/images/07Kreuz.png | Bin 0 -> 567 bytes src/main/java/solitaer/images/07Pik.png | Bin 0 -> 510 bytes src/main/java/solitaer/images/08Herz.png | Bin 0 -> 543 bytes src/main/java/solitaer/images/08Karo.png | Bin 0 -> 557 bytes src/main/java/solitaer/images/08Kreuz.png | Bin 0 -> 588 bytes src/main/java/solitaer/images/08Pik.png | Bin 0 -> 530 bytes src/main/java/solitaer/images/09Herz.png | Bin 0 -> 540 bytes src/main/java/solitaer/images/09Karo.png | Bin 0 -> 555 bytes src/main/java/solitaer/images/09Kreuz.png | Bin 0 -> 584 bytes src/main/java/solitaer/images/09Pik.png | Bin 0 -> 527 bytes src/main/java/solitaer/images/10Herz.png | Bin 0 -> 523 bytes src/main/java/solitaer/images/10Karo.png | Bin 0 -> 539 bytes src/main/java/solitaer/images/10Kreuz.png | Bin 0 -> 563 bytes src/main/java/solitaer/images/10Pik.png | Bin 0 -> 507 bytes src/main/java/solitaer/images/11Herz.png | Bin 0 -> 499 bytes src/main/java/solitaer/images/11Karo.png | Bin 0 -> 518 bytes src/main/java/solitaer/images/11Kreuz.png | Bin 0 -> 540 bytes src/main/java/solitaer/images/11Pik.png | Bin 0 -> 483 bytes src/main/java/solitaer/images/12Herz.png | Bin 0 -> 509 bytes src/main/java/solitaer/images/12Karo.png | Bin 0 -> 525 bytes src/main/java/solitaer/images/12Kreuz.png | Bin 0 -> 552 bytes src/main/java/solitaer/images/12Pik.png | Bin 0 -> 494 bytes src/main/java/solitaer/images/13Herz.png | Bin 0 -> 511 bytes src/main/java/solitaer/images/13Karo.png | Bin 0 -> 527 bytes src/main/java/solitaer/images/13Kreuz.png | Bin 0 -> 554 bytes src/main/java/solitaer/images/13Pik.png | Bin 0 -> 495 bytes 55 files changed, 77 insertions(+), 10 deletions(-) create mode 100644 src/main/java/solitaer/images/01Herz.png create mode 100644 src/main/java/solitaer/images/01Karo.png create mode 100644 src/main/java/solitaer/images/01Kreuz.png create mode 100644 src/main/java/solitaer/images/01Pik.png create mode 100644 src/main/java/solitaer/images/02Herz.png create mode 100644 src/main/java/solitaer/images/02Karo.png create mode 100644 src/main/java/solitaer/images/02Kreuz.png create mode 100644 src/main/java/solitaer/images/02Pik.png create mode 100644 src/main/java/solitaer/images/03Herz.png create mode 100644 src/main/java/solitaer/images/03Karo.png create mode 100644 src/main/java/solitaer/images/03Kreuz.png create mode 100644 src/main/java/solitaer/images/03Pik.png create mode 100644 src/main/java/solitaer/images/04Herz.png create mode 100644 src/main/java/solitaer/images/04Karo.png create mode 100644 src/main/java/solitaer/images/04Kreuz.png create mode 100644 src/main/java/solitaer/images/04Pik.png create mode 100644 src/main/java/solitaer/images/05Herz.png create mode 100644 src/main/java/solitaer/images/05Karo.png create mode 100644 src/main/java/solitaer/images/05Kreuz.png create mode 100644 src/main/java/solitaer/images/05Pik.png create mode 100644 src/main/java/solitaer/images/06Herz.png create mode 100644 src/main/java/solitaer/images/06Karo.png create mode 100644 src/main/java/solitaer/images/06Kreuz.png create mode 100644 src/main/java/solitaer/images/06Pik.png create mode 100644 src/main/java/solitaer/images/07Herz.png create mode 100644 src/main/java/solitaer/images/07Karo.png create mode 100644 src/main/java/solitaer/images/07Kreuz.png create mode 100644 src/main/java/solitaer/images/07Pik.png create mode 100644 src/main/java/solitaer/images/08Herz.png create mode 100644 src/main/java/solitaer/images/08Karo.png create mode 100644 src/main/java/solitaer/images/08Kreuz.png create mode 100644 src/main/java/solitaer/images/08Pik.png create mode 100644 src/main/java/solitaer/images/09Herz.png create mode 100644 src/main/java/solitaer/images/09Karo.png create mode 100644 src/main/java/solitaer/images/09Kreuz.png create mode 100644 src/main/java/solitaer/images/09Pik.png create mode 100644 src/main/java/solitaer/images/10Herz.png create mode 100644 src/main/java/solitaer/images/10Karo.png create mode 100644 src/main/java/solitaer/images/10Kreuz.png create mode 100644 src/main/java/solitaer/images/10Pik.png create mode 100644 src/main/java/solitaer/images/11Herz.png create mode 100644 src/main/java/solitaer/images/11Karo.png create mode 100644 src/main/java/solitaer/images/11Kreuz.png create mode 100644 src/main/java/solitaer/images/11Pik.png create mode 100644 src/main/java/solitaer/images/12Herz.png create mode 100644 src/main/java/solitaer/images/12Karo.png create mode 100644 src/main/java/solitaer/images/12Kreuz.png create mode 100644 src/main/java/solitaer/images/12Pik.png create mode 100644 src/main/java/solitaer/images/13Herz.png create mode 100644 src/main/java/solitaer/images/13Karo.png create mode 100644 src/main/java/solitaer/images/13Kreuz.png create mode 100644 src/main/java/solitaer/images/13Pik.png diff --git a/src/main/java/solitaer/Card.java b/src/main/java/solitaer/Card.java index 76cc107..a5b7128 100644 --- a/src/main/java/solitaer/Card.java +++ b/src/main/java/solitaer/Card.java @@ -1,7 +1,10 @@ package solitaer; +import java.awt.Graphics; +import java.awt.Image; import java.util.Objects; +import javax.swing.ImageIcon; import javax.swing.JPanel; enum Symbol { @@ -9,20 +12,31 @@ enum Symbol { } public class Card extends JPanel { - + /** * */ private static final long serialVersionUID = 1L; private int nr; private Symbol symbol; - + private boolean faceUp; + private Image Up; + private Image back; + public Card(int nr, Symbol symbol, boolean faceUp) { + this.setSize(72,96); this.nr = nr; this.symbol = symbol; this.faceUp = faceUp; + + String cardName = "" + getFileNr() + getFileSymbole(); + ImageIcon iiup = new ImageIcon(getClass().getResource("images/" + cardName + ".png")); + Up = iiup.getImage(); + + ImageIcon iiback = new ImageIcon(getClass().getResource("images/back.png")); + back = iiback.getImage(); } public boolean isFaceUp() { @@ -37,10 +51,41 @@ public class Card extends JPanel { return nr; } + private String getFileNr() { + if (this.nr < 10) { + return "0" + this.nr; + } else { + return "" + this.nr; + } + } + public Symbol getSymbol() { return symbol; } + private String getFileSymbole() { + switch (this.symbol) { + case Herz: + return "Herz"; + case Karo: + return "Karo"; + case Pik: + return "Pik"; + case Kreuz: + return "Kreuz"; + default: + return null; + } + } + + public Image getImage() { + if (faceUp) { + return Up; + } else { + return back; + } + } + @Override public String toString() { return "Card [nr=" + nr + ", symbol=" + symbol + ", faceUp=" + faceUp + "]"; @@ -63,6 +108,11 @@ public class Card extends JPanel { return faceUp == other.faceUp && nr == other.nr && symbol == other.symbol; } - + @Override + protected void paintComponent(Graphics g) { + // TODO Auto-generated method stub + super.paintComponent(g); + g.drawImage(getImage(), 0, 0, this.getWidth(), this.getHeight(), this); + } } diff --git a/src/main/java/solitaer/SolitaerGamePanel.java b/src/main/java/solitaer/SolitaerGamePanel.java index 520ae04..73fc4d0 100644 --- a/src/main/java/solitaer/SolitaerGamePanel.java +++ b/src/main/java/solitaer/SolitaerGamePanel.java @@ -16,6 +16,8 @@ public class SolitaerGamePanel extends JPanel { public SolitaerGamePanel() { setLayout(null); StartStack a = new StartStack(25,25); + a.addCard(new Card(13, Symbol.Karo, true)); + a.addCard(new Card(1, Symbol.Karo, true)); this.add(a); } diff --git a/src/main/java/solitaer/StartStack.java b/src/main/java/solitaer/StartStack.java index 79b3242..2ab0504 100644 --- a/src/main/java/solitaer/StartStack.java +++ b/src/main/java/solitaer/StartStack.java @@ -11,24 +11,39 @@ public class StartStack extends JPanel { private static final long serialVersionUID = 1L; private Image im; - private ArrayList Stack = new ArrayList(); - - + private ArrayList stack = new ArrayList(); public StartStack(int _x, int _y) { super.setLocation(_x, _y); - super.setSize(72,450); + super.setSize(72, 450); super.setOpaque(false); super.setLayout(null); } + public void addCard(Card _card) { + stack.add(_card); + System.out.println("dfsfdsf"); + addtoPanel(); + } + + void addtoPanel() { + + this.removeAll(); + for(int i = stack.size()-1; i>=0; i-- ) { + System.out.println("for"); + this.add(stack.get(i)); + } + } + @Override protected void paintComponent(Graphics g) { // TODO Auto-generated method stub super.paintComponent(g); - ImageIcon ii = new ImageIcon(getClass().getResource("images/back.png")); - im = ii.getImage(); - g.drawImage(im, 0, 0, this.getWidth(), 96, this); + if (stack.size() == 0) { + ImageIcon ii = new ImageIcon(getClass().getResource("images/back.png")); + im = ii.getImage(); + g.drawImage(im, 0, 0, this.getWidth(), 96, this); + } } } diff --git a/src/main/java/solitaer/images/01Herz.png b/src/main/java/solitaer/images/01Herz.png new file mode 100644 index 0000000000000000000000000000000000000000..62d0956036088f5c44006ad1f8e3bcc22060673e GIT binary patch literal 523 zcmeAS@N?(olHy`uVBq!ia0vp^oEakt!FcyzVAc}{hNBKI z|FvH;lj!-F;`~XpA~dXLQ_>XC#cL!|k7{VgP4WJyy0jv&OMU4N>o6Nl_k}V?yNg8h zy*@4xsXyK|yGTU*sYc!@xQaVd9(iiUO?l+1ISm4Eakt!FczeW0sC5!%>Hq z|JtwlYiP{clD;9lO+4|ahPGRz;i;~`u%1ni7TI*=YaVsgw9`C#f8(RcMIxsHW2P+L zp>fpPvTJ`bh-@zs(SHgQe6&#J==@EOmWs@u@@SEW_)-gyviV)@K^py!CV$eXJJ~fo zs3xeZJ1Ay~lV#WcjxTDUNUEM`Md5yX=2u&cB zi)4;26yaa`!wck|{>YC(eIQ$1HTAqc0%e!V9Cg-|^ZGayrq};epoaU$sX!aSa+X~{ zgWH2@ye+waMj!6#{-m*QDbS@qmH>Sa{4t>GKhU@Fo06u8E?y&%iX03>Oz0nD_^v&E U`5oE^fRWDN>FVdQ&MBb@0DH9N+W-In literal 0 HcmV?d00001 diff --git a/src/main/java/solitaer/images/01Kreuz.png b/src/main/java/solitaer/images/01Kreuz.png new file mode 100644 index 0000000000000000000000000000000000000000..a202c885615d14cccd85cbfeb05b50a1036c08b3 GIT binary patch literal 564 zcmeAS@N?(olHy`uVBq!ia0vp^oEakt!Fcyz;3{o)0oIMd zzvH(sF|+aS`&oA(=tf|od#kKySqPAke^u^Ayw;nwhxUcs*f0ET>8-Xb>2G1Vhwo{< zS$wPQuXUpQRkJsNxrgmm*>2d*RULABLp@Liq&m8FZ|Du6%6%a#z8%;XQk?)a#=F&a z)!zelhwMO1pmcOA$h5bOdqZyr0L=i2{smf5+fo~HV>(y$>J8ho|nPEWpnE~wti}Jq-OawXgR@>gzTA-jiNFUTu{an9+j{Fytdsq(W zUhl2EzXhRwS$qiM6L*7UHx3vIVCg!0ES=`5dZ)H literal 0 HcmV?d00001 diff --git a/src/main/java/solitaer/images/01Pik.png b/src/main/java/solitaer/images/01Pik.png new file mode 100644 index 0000000000000000000000000000000000000000..faa496eae00ca694295a9816f5cb18d65c464a15 GIT binary patch literal 506 zcmeAS@N?(olHy`uVBq!ia0vp^oAx>Eakt!FczeBbPL%h|9*R z@Ag~RqDYGbx5|o^h1>{CbZ`9|x0Uy|eCyuO>V*2>#QdxGHn?wP-xhk~eQWK? zZ3}O;?G3%XVLR9F726W~v!o&7A-92Qcz>_>cHo}Y8}HV?3lG)lzgc`}U&xJUpgA|D zb5)1jSbRwCs@WU%Lv|n)K*8wNT9CF@Tdkbc+Y2ds r66D}^kSl=Ra{&7i?%koo_{(l6_|9+QuMdxaamwK7>gTe~DWM4f_yye^ literal 0 HcmV?d00001 diff --git a/src/main/java/solitaer/images/02Herz.png b/src/main/java/solitaer/images/02Herz.png new file mode 100644 index 0000000000000000000000000000000000000000..559fbbebcda0b7e008345bf5cb0327b40ea46200 GIT binary patch literal 530 zcmeAS@N?(olHy`uVBq!ia0vp^oEakt!FcyzV3w>S!x4v< z|JuXY#HJn8H#--;VD%b_)T0{OZjpwkx&p&$7TR>_Pl^5*)HOTkkA2vkDT@R89xatQ z>TKE79&~5QqyHPBy!RSMoi+2kKK_pYtF3X@l=CVK?wb8cBhL$HM*F9gKV-GzKtlV2 z`W`K;(TY12sNw!GNbV^Al*KS9|5Jf`raW3E!v9o5?o^-+P@=I&WPjRGZ;;8YMIz=) zcW54U{uyF3BJ_&ilVg)#%N6CDz_@1c MboFyt=akR{03n{`wEzGB literal 0 HcmV?d00001 diff --git a/src/main/java/solitaer/images/02Karo.png b/src/main/java/solitaer/images/02Karo.png new file mode 100644 index 0000000000000000000000000000000000000000..028c2762d7bd5cc0f5cb08fcb3ce50cc3dc7e4ef GIT binary patch literal 546 zcmeAS@N?(olHy`uVBq!ia0vp^oEakt!FczeW0sC5!%>Hq z|JtvqsED}UmfIKJCZ2dyL)$IV@Kje|SkIv3yNMaG#T9S9_7j zbRY_{nX>qYbr_J`0c3Or#dsBJx_?~0rb6TB?4Um`ntDqufZ_}Gh)xgE2>-Y&=BR$; z$AB*Lr9Y;DG;6qj{6FPU&^n+EBBuiXw2AUBtqAT~KV@-+M*pMeQ(!X}$Q)fNbJTt_ z#Ck`|F7u}vAR}dtE(DrTvlQg0^FaIDK^8BQIm*5i=n^pZ=u(k*O|URf9_(nK)_p-x zr-M8YRO4;Q^;Dzoa2Nln&^?;*Kv(Y3JnCGjt+(_?XOZas6y#t?nj*S*jYR4Y6Z*^k YNpqjy_Je*$fN{^@>FVdQ&MBb@04|v6<^TWy literal 0 HcmV?d00001 diff --git a/src/main/java/solitaer/images/02Kreuz.png b/src/main/java/solitaer/images/02Kreuz.png new file mode 100644 index 0000000000000000000000000000000000000000..8a0fd4621f952f65b945028e960b8785ba6395c7 GIT binary patch literal 574 zcmeAS@N?(olHy`uVBq!ia0vp^o6H~ja%;k}jjs@a>xx7uu1 z<=$9)$PP&USBLTKLx4hZK>2#nZ-I&WqTl#MzpdD?_Ey{8kQLt!!~u<(4l>4ltNac3 z8}6-pLvF-_OmW)E`#bDyW9{l~3vad6hTQOO{ks&%Xn`kgw>RW>qpjAPrHABz-U7Qv mZUxjQNWldUw;{mz%l@!hC6@j9?H9mw!QkoY=d#Wzp$PzocmZbs literal 0 HcmV?d00001 diff --git a/src/main/java/solitaer/images/02Pik.png b/src/main/java/solitaer/images/02Pik.png new file mode 100644 index 0000000000000000000000000000000000000000..0a1e2742c2958a1adc8208604cbec9d62793e615 GIT binary patch literal 517 zcmeAS@N?(olHy`uVBq!ia0vp^oAs>Eakt!FczeW0nr50P9Ba z@Ag~lL`1fHthl+^L-Wmw4T}%;aan7<`MoOl#(#}B%d_}_SbjtJ*7+OUx3X^wz45)Z zcEz@Zx7zjs6)e8hW~=okH21LFRkNJc8{TtQhu#J%vAO+<;kHx9ZygyO7_kKs!NZB(CTB-30S8-0wq#@r!+y{YSs<-U+LL(aYfJ>gTe~ HDWM4f5~%(% literal 0 HcmV?d00001 diff --git a/src/main/java/solitaer/images/03Herz.png b/src/main/java/solitaer/images/03Herz.png new file mode 100644 index 0000000000000000000000000000000000000000..05c7794ded6624585c53161a173f95268e28fc8a GIT binary patch literal 532 zcmeAS@N?(olHy`uVBq!ia0vp^oEakt!FczeXO@B^!x4v< z|NF0rh?w-6+o(IcMHrsy3JmMnlr%+j@tPkFJG=O&Y=5*+B;V^}`I?I0J}1kr_9Bt# zKoqn`^XUDJj~2=tT`F_5e9EJsF7u^7tix=kJo44tw*)8((z7h)=;f4BQmy(_LvLwCaF@3w6v=D2f6Rs&xfo*Q z(weXsuaC@6HU71W@&naB)z}Areceq+SCR+U~DsZ My85}Sb4q9e08{(q1ONa4 literal 0 HcmV?d00001 diff --git a/src/main/java/solitaer/images/03Karo.png b/src/main/java/solitaer/images/03Karo.png new file mode 100644 index 0000000000000000000000000000000000000000..da7c45d468da5f8ee534c8eb10823f26b53153d5 GIT binary patch literal 547 zcmeAS@N?(olHy`uVBq!ia0vp^oEakt!FczeW0sC5!%>Hq z|JtvqsED}MS8oV!6Hh#0Z z20!vX6{z9m7T#*hlK!@8TVg+u zTCpK~EAQ|6LvdHl-UQ|z{uhwg&s80Ad&7UNH=&90T5rrj;)&5fH3186G5-#D+gQ6| z1Hb6E72lY@aaD)jXy^JJ_O@}a7Enw6RXLzt(yMYIHsu2u+DL}HZLM9sE%823bn&e= zTdgA!>Eakt!Fcze<0@u$0oIM- z-|e?BF*BQ;jJN8ZcBqfbTI~-+Ywd~+ z|ATT5%ZYwlcnC^sD36yy?w}y#fSa{0Ikt~lMd0BdlEakt!FcyzV3w>S!x4v< z|JuXY#HK0gn|%vkuzHO|>QN1Cw@AZNU4dbLTq{N51G{Di-I?;}|HenlWLk?v=1*C? zL-VMw=0ADuxKn{PAYT8YWg_NFf7Gw307(EvHGou}S7ERmke=fHF~CmLKKZCOQ0QYo z-=l!8*`HQcXu2R6`D^31}VA)CvutzP?A&rvm@X5Y=A_v~pq1 zQi~}-oA{pwe+=l#2g*x_?SUxt1l!itUL^8=3DCiPkEXBL0k*&%XC#VFn%T0&Rkc`~>8-4|GA0gP(~Pgg&e IbxsLQ0J_58k^lez literal 0 HcmV?d00001 diff --git a/src/main/java/solitaer/images/04Karo.png b/src/main/java/solitaer/images/04Karo.png new file mode 100644 index 0000000000000000000000000000000000000000..4c37a84176457f1d57be15be14e0b4bc114837a3 GIT binary patch literal 547 zcmeAS@N?(olHy`uVBq!ia0vp^oEakt!FczeW0sC5!%>Hq z|JtvqsED}UmfIKJCZ2dyL)$IV@Kje|SkIk amHMq+hx}BP^v!^g&*16m=d#Wzp$P!+MCMxn literal 0 HcmV?d00001 diff --git a/src/main/java/solitaer/images/04Kreuz.png b/src/main/java/solitaer/images/04Kreuz.png new file mode 100644 index 0000000000000000000000000000000000000000..acbfba91d74e04b725ef4ca882230a8490378765 GIT binary patch literal 574 zcmeAS@N?(olHy`uVBq!ia0vp^oZ^%!S2bvU^d$&sE=!iG5#}fPSJ{;F~2w*m@XJRUHx3vIVCg!0Fe$E`2YX_ literal 0 HcmV?d00001 diff --git a/src/main/java/solitaer/images/04Pik.png b/src/main/java/solitaer/images/04Pik.png new file mode 100644 index 0000000000000000000000000000000000000000..d33a44881739141cd42462d9b4baa08a42f8b188 GIT binary patch literal 516 zcmeAS@N?(olHy`uVBq!ia0vp^oA$>Eakt!Fcze<0@@VF_(=N zzvH)X3Gw{=@pfT#!O{(j5A|_bYrR>q;r{AviT~Xb>qDy(;zMqDZ{5GaeJlI6&>Qbt z_lDdK$UXcoF!ykr)|?=5zjDu`RJbOZrEakt!FcyzpqGLp!_fmz z{P<;gL>I4-NIj~d?H2j5@soyKK;BVr%{;G<Z`eL ziHP~qAJ$=erYx?|aQ_(8rLPGT{nsa|zjTM@QRkha<{;X)5~wOb?x^$6H9sV^Bwf#%N+`qLj| zGv(1Tpy=jD3q|e+^gS|PQ=#ep5yPebp3%rk!)x@XEGW1y+&Fi#tv>Iw|&K?#Q;BDA93!+49|9&?2U Qz{qCsboFyt=akR{0HPP;4FCWD literal 0 HcmV?d00001 diff --git a/src/main/java/solitaer/images/05Karo.png b/src/main/java/solitaer/images/05Karo.png new file mode 100644 index 0000000000000000000000000000000000000000..45d75cae6bd3abd070b5d525dcbf2727d1f4a127 GIT binary patch literal 548 zcmeAS@N?(olHy`uVBq!ia0vp^oEakt!FcyzV3&+1!%>Hq z|Jtvqsff7l-dnMcEv`j$@fwNLqZ-<7k%p(b_)mq_1l;Rt589)7^!>(1zLs21HSSG$ zq`kC4!~J9R8X#Gy>HaaGYyFf*L4A+HBY{lwr8}lKe)?#C(wpKpi#mQ*?mAmg5-{dpIW?Q%HkgjWR5PCIcmT8 z(L#}YuaD+lK&yb-*nuVht$5_`^>LZV|1(|fMIzISMB+7pE&(Zbw(RoO)LZ&vGFTWW zZ~jzc%3_d1fz|{-RfF^d)hv~1EfTR$1e&O2r_m2|9MESA_lQmp`qNt^YM%lNgTSz! jO-WNwf@O#Z{bm0ca=_2&XlXhy_8B}~{an^LB{Ts5b-L%O literal 0 HcmV?d00001 diff --git a/src/main/java/solitaer/images/05Kreuz.png b/src/main/java/solitaer/images/05Kreuz.png new file mode 100644 index 0000000000000000000000000000000000000000..7ab055a1da5c0b484637a7de6bde9666e635e393 GIT binary patch literal 575 zcmeAS@N?(olHy`uVBq!ia0vp^orH6x z;eT^Cgm2}o4!OM{y!G$WLvmNm-puE!4!z;tYP+g7L0)uQ=c1J%{R6ZA-KV8s-kN z4QTw|pxncDhvGzmhW=j+vKOeepX>M1TlzN^gIu~Cs4e)$>RWBLK%+p$ffWIb+z(U; z!a#$7eo5TlQX6tR0O*RVW;v_3C9VfL4JZfn%dIvL26`UkOQCPUK=%i46^Hs^!~ejy xt$#z_HgZ*m{AR6gl@%=uxe=J?KExPT>JtyE$KKsi)Cx=(44$rjF6*2UngE1f{>uOW literal 0 HcmV?d00001 diff --git a/src/main/java/solitaer/images/05Pik.png b/src/main/java/solitaer/images/05Pik.png new file mode 100644 index 0000000000000000000000000000000000000000..6bbfab9ab0cc9d3dd2965c4bc39c19da4c70ae18 GIT binary patch literal 519 zcmeAS@N?(olHy`uVBq!ia0vp^oAw>Eakt!FczeW0nr50P9Ba z@Ag~RxVUcBRNvg}q4{RThQ){axU99_{9cuN--JwTiLgT-uT{H zyJFkITWz%~Hrx-nvHDhN zaRzGJ;NEJh^(HX)@IHk%p^5Tf<~Fd7@U6VnKy`;eJlVwcT)zVn_pbyQXAk65hpgC^ z7%vPom|yf;JCJ(=r1foUtuM^_e4rB+ANm&nvLDDSZ-F>*FUV!NhvT5S76Tpac*Fmy z91zEWT<8pPPH1AhKv~F*z(n^}SAUiO5sFc1T%QL`njxgN@xNA-NoVb literal 0 HcmV?d00001 diff --git a/src/main/java/solitaer/images/06Herz.png b/src/main/java/solitaer/images/06Herz.png new file mode 100644 index 0000000000000000000000000000000000000000..04e7477972180d16619eeb2ee187d5f5113db8c1 GIT binary patch literal 540 zcmeAS@N?(olHy`uVBq!ia0vp^oEakt!FczeW0sC5!%>Hq z|JtvqsE8cR@81~SCZ2dyL)$IV@Kje|SkI3h47K-G16>7E?iROEKTn1Dcx(CFW{%Pe8No_fh z(DWkFQ-L;9{Es?Yay`|M1Dfw_*)<=g(Y;U;h>p$?GfjZ2A+CZMP)0_`Eakt!FczeW0sC5!%>Hq z|JtwlduViROWzRQCZ2dyL)$IV@Kje|SkIwTXxx}9(C5dH|0?f*HbMZ70~yn`BPYo*TR^ivx`Lcr$8mw z0S##n(s2LyAEGPfq&XW`IlA%gA4(oN|F0Paz~fS9A$s1q4!jy?hH`F9?hdm zf$k{ObYBP-=UcjC$|G%%Ci%^efI>jkPy})lKTsoB0n7lPv!^VE_@F(=X3F9nQx;o* z$Vbtq0)cLk4yy@R_edM;ZeLBgQ_+Q*N9zOEJ(|8oA{9AElBS3*9%4c(>L2-^@H1>| Ro(oI_44$rjF6*2UngBT#?-c+5 literal 0 HcmV?d00001 diff --git a/src/main/java/solitaer/images/06Kreuz.png b/src/main/java/solitaer/images/06Kreuz.png new file mode 100644 index 0000000000000000000000000000000000000000..c79e6727f4bbe41ea1f7faf32a8f222191b92cb7 GIT binary patch literal 584 zcmeAS@N?(olHy`uVBq!ia0vp^o+S^9566Xiv}y>F=vxgC&u*ltzs4SmsX ztF|Tn_q(zBR+}x5zxY<$-=&A-uA04>&s80I!@bp3E2KI>UUXaN?G620SLJTFZ)N`$ z2r^~GH|}pxC97(xxFF0wKn8NJWxm*V(E%)iTzp9KwXFGfEL;V zjdS11TO9(l;cpPoDTm@jfyVZ8{ayhQ2U@@QP~A$P4J&}Q{$2@mlnBV3U=yGeSbyjZ zeV|$p4utwAQ66kPP$kgr)raChQi=5|w}J4&Tg=r!i}$zu4SC!6H|T96(1{=)zNrtX w20E#F0np=h2jddmTV+MdLT&^OF~(QmdKI;Vst0021u$N&HU literal 0 HcmV?d00001 diff --git a/src/main/java/solitaer/images/06Pik.png b/src/main/java/solitaer/images/06Pik.png new file mode 100644 index 0000000000000000000000000000000000000000..35e3403c443db87800f4c90e66db2ee282171b15 GIT binary patch literal 527 zcmeAS@N?(olHy`uVBq!ia0vp^oEakt!FczeBbRi9nCr&s zZ~HSuYYZ%w7?<$R6DbS15t!)SDl7V}`l{KR{~B-nugbmAziPLkKdb)Gye$50p*P;Q z)~?*P@Kzg;OsroCl#u=wa(lztLv{LZ7T;>K1!@CI{PzZ`+OR(aq&norbgpWxkm?Qk zqTiMtng?WqRM-oA3rvg$GQTYVniX=xeJd|WV#C^7ZGYWvxP!DWhZ^@y{mo*aKA_3z zhwQZ8c(>X@4Eo*9RlTYzopr03FK&s{jB1 literal 0 HcmV?d00001 diff --git a/src/main/java/solitaer/images/07Herz.png b/src/main/java/solitaer/images/07Herz.png new file mode 100644 index 0000000000000000000000000000000000000000..b16d6637329b15ee268ef5dd4e3df5d40c96b6da GIT binary patch literal 525 zcmeAS@N?(olHy`uVBq!ia0vp^oEakt!FcyzVAc}{hNBKI z|FvH;ljxC5cm5<=5gOLBDQSx6;x!VfM>VwVG^RiDtkl-?`nW`-{&<)AQ;jK$f3yX~ zOnKy~`L9pZ{HccCslXaf%dYMq8_lElH$GY>;_vlQb?FYxqmzLmK+T#{ybA;Gb5E zF8*N)_K&aTJ&^FcDba<&UFJ{M0v+HMX?UtD5XI+1OX!t+)Rql?JLAh;fYHq0>FVdQ I&MBb@0FB<>+yDRo literal 0 HcmV?d00001 diff --git a/src/main/java/solitaer/images/07Karo.png b/src/main/java/solitaer/images/07Karo.png new file mode 100644 index 0000000000000000000000000000000000000000..854f4f072eb4e64329009bb1627dd82253d3c8d1 GIT binary patch literal 542 zcmeAS@N?(olHy`uVBq!ia0vp^oEakt!FcyzV3&+1!%>Hq z|Jtvqsff6KU-Pj>GOk5*@fwNLqZ-<7k%p(b_)mrI(Y)W~t$Arn%kAnIhxt|J*@ha4G|L7n2F`&zQ>5qv)Hd7t}<(fZ*#ds}@IXb&Y zbbrcGXOJngi$wUB0;SGRc@(tnQFD>VslY#NqWnuMg1hp)J}$HAlGp49nF*AcUL;a~ zwyQm8kLFSKryBRBEC!iaB+?!fnt~DtfnhyE cP3Rvp^OHS(f=*(uf$`4Z>FVdQ&MBb@0QEakt!Fcyz;3{o)0oIMd zzvH(sF}E4+`&oA(=tf|od#kKySqPAEf0gZq=~?z0+*|jC+}JPtEhyJ{EAQ`m(Qhj@ z^k+$bd*4zUa(jb2P{?~LZ*|Cx#kbo21}DmkehW&hU%8>5>-MVL8{Vy1{BM@tVy<4f zVLDfJ$nVBlpeCT`-xb?{DuD{N1LdQ)@?JH2v-nV))*F2wLm9#Z+4}pyzR=qn@_~YZ zxrgOICfkDyy#aR7cAy);P68S(f3+^5p9{zUsg1q?bW}CaZTX_#)*g}rn_UOw?uR(H zdgZo6`$KW7a)EBR4{`$6Zy>9m3*-$DzA6XO|JxhvHg}*?!A`&Nf5o@P+ST72T5VVT pJz#gJkIP!?&58|+hZy6P{jXZZ*n_r#Yk&!Y!PC{xWt~$(69A(@7Lfn| literal 0 HcmV?d00001 diff --git a/src/main/java/solitaer/images/07Pik.png b/src/main/java/solitaer/images/07Pik.png new file mode 100644 index 0000000000000000000000000000000000000000..9391d2aa16195660d813fd540438e04da4647c6a GIT binary patch literal 510 zcmeAS@N?(olHy`uVBq!ia0vp^oAz>Eakt!FczedZxkXmAEaXODqI>J#xUIau`gjEd+n-iiTPS@_(i|1_}28-2WGjy=(m-J{sn*x23nurvUlaSg}2&3iswTVZ*T|t zrE!Bl(EZc7eg`GiuK+nPEakt!FczeW0sC5!%>Hq z|JtvqsED-w?%x>RCZ2dyL)$IV@Kje|SkIEau589)7^!~<2zLs21HRMhO z#sHDm$7Le*$Gh5#M5Y4~NWoH(e6Nq?YbrF3&JF^pfGWyA6}m^WwMcaOrwdFwi z_@Az=(3lU>dn(Xo%IY6&MI!deN1ZkAO?ed52S#1yOLt6J3_)P&G^jLK;*qbW-qYYh z&7npHIM!e?0YnQO+|2@lO?h%oh`fky*~P%3j8xqG+rb8W9z3d zn<+p8?@e+47|`W^YWbt|H4>@Fp^!91bny@qTJfKua^gO}?Ocv?ff3K(>FVdQ&MBb@ E0Mriby#N3J literal 0 HcmV?d00001 diff --git a/src/main/java/solitaer/images/08Karo.png b/src/main/java/solitaer/images/08Karo.png new file mode 100644 index 0000000000000000000000000000000000000000..064e2349b1574d44e467959dcf1e8c1b688ecee5 GIT binary patch literal 557 zcmeAS@N?(olHy`uVBq!ia0vp^o>Eakt!FcyzV3w>S!x4v< z|JuXY*rq+Tl?CYrS_2Ue z=j9%P8kl*K!y0G+uWL@x#^xCgdnA=F*`Pc`(OYVZNcr9g`` zfGRk(?KHwaI#$A62-F@Ab}}?HdNw6Z5nYTDKtn|66~EHKQ+`P^)~^I60|rl5KbLh* G2~7Z3R`Fo~ literal 0 HcmV?d00001 diff --git a/src/main/java/solitaer/images/08Kreuz.png b/src/main/java/solitaer/images/08Kreuz.png new file mode 100644 index 0000000000000000000000000000000000000000..3ed11e711022282641ec081ed3b971e7e6ffc9f0 GIT binary patch literal 588 zcmeAS@N?(olHy`uVBq!ia0vp^oT<5L4)uBMef4zYWhzdENHG#Q@<*vrvSPxbQwcbwa z4af$;Z>u0SySD<`(2HG^ybngR4m=xv}8AZPrZ4)nI|hHwyTL;O`aprP_NRv!Xd4-6Fdt>Pe; s1I_)${*B98>&=P{ix2e;HO7C&%>iby4+9eTfT@JR)78&qol`;+0PV3K!2kdN literal 0 HcmV?d00001 diff --git a/src/main/java/solitaer/images/08Pik.png b/src/main/java/solitaer/images/08Pik.png new file mode 100644 index 0000000000000000000000000000000000000000..65191129baf87ebdebad122c05e7a85391a935e7 GIT binary patch literal 530 zcmeAS@N?(olHy`uVBq!ia0vp^oEakt!FczeW0!V>kn6_k zZ~HS$Z44|l|6Q=<(0sFE!{S4IT-I7|zOTx?@jviJ{8hO(>$BoF^k>y4`fp{w4U{;v zFXVPW?qNHig5cc4^SFMm*anp11xq0WgA)B)Ygcagzhc9E?%yjm=!<>}xxHcetu|ZH zZ%Yr&9l_mX6Ix&7#F3^GUP=i|k zI=2Fy05nLREakt!FczeW0sC5!%>Hq z|JtvqsED-QPW}_#CZ2dyL)$IV@Kje|SkI&6G!zKdt;Bi|~HZ6w$?NBvO$>WJn0TvTuvpEakt!FczeW0sC5!%>Hq z|JtwlduViROWzRQCZ2dyL)$IV@Kje|SkIM`sZ1+a+yZ39`YDfmHS5lFwHJX@-w)~oiUHjO;s(WdeVhswwof}cyGY~|&`h9A zkPX;K3lRAz`c$BX`$y@pnt*kWnm=g(UG1wW2XgY!`oMLMrmvAmMGlgrDWZ#qn9z!P Y{jL*!CjU=l0TTg(r>mdKI;Vst0NttRVE_OC literal 0 HcmV?d00001 diff --git a/src/main/java/solitaer/images/09Kreuz.png b/src/main/java/solitaer/images/09Kreuz.png new file mode 100644 index 0000000000000000000000000000000000000000..1838a50cbb13577f5a97cd50ea8dcfbf4e3370e8 GIT binary patch literal 584 zcmeAS@N?(olHy`uVBq!ia0vp^o+K)m>noz|QCoWECWTX?IjHsp3d?%_Dm zZ>zQ?{`b4F`c|9ms@xlkq0}L{t7dQJb5)1laBsEM0_v0#-4=R#LqFG5xf||V*}nxQ z%8Pzm@s0Z%R0&k8R>ku9!{4CX!*+*&ZUGv5Rc-}H9BBRGLv<^GHmm^J`g`TAw!b1Er}k$_f13`( zU`0UZ=>rvla3IhGpd<8w2ABbD1l!uW7v!u%|A3|gG01M90ri|f!Eakt!FczeBbTz92dZYl{ZJp5wbq*z8x|j`TYszVZ~vixA#V@dWdQ~ozbZ@NkSZnKV+x%#=F&4 z^xM)y^SFKoCHjNdKyC6IzgKL~2Qz^t0L21x56|PO*2-DEEpfl#w?L5o#kbnB_`ikx z76x+tTeGCU87Inv4B8h`9RL*g>)L92)o#Ol&fhD*_WsrfIbp;86(BbORZAzvugV2V z{a<>ktv2LFd?1PE|O=V7WZEakt!FcyzV3&+1!%>Hq z|JtvqshGH4Un5yB8P_7Zc#TBrQ4MXkNW)WI=1YG}EE4ti`nW{of1hall*JXneNL8L z{7Wl>y6TU2sXx`)r{P|x2}DOH2mP@Q+oO3@93Eakt!FcyzV3&+1!%>Hq z|JtVs3(Z=TUG}j?GOk5*@fwNLqZ-<7k%p(b%$NR{SS0H2^>K;F|31<9DT^zD`iw^IbZN{{@uwO?n6Ie_?vmF8x=jS=y@eo${tEakt!Fcyz;3{o)0oIMd zzvH(sF}E4+`&oA(=tf|od#kKySqP9}uk}X%s@x6l*1aJ&_6vVod#mm5ifs#Twbh2) zaNo-NyZlhxD%%bDSIyo8<{p+4{kCFT;{T8v{anAp67_++4M6pKLson{08%xbt9s=I z_pS0b+z|=_au4qdtxmYVDi^3zUi4c~V*N@W17vM9$jZgH*gOyX8hnU9;w0tR$|GUvv3&_|PdV51YSpQbu>X6$T+*@r|<=${_1v(pSHprNu z+{1M(e^+dfziI|l0dy@;4oG?fJp{x+?}EJM4RWRTR(7D9z+U+u_?G#1*xN>~YM@oM jEzt0R2h+%`2}Vqoxe^>bP0l+XkKWTW{s literal 0 HcmV?d00001 diff --git a/src/main/java/solitaer/images/10Pik.png b/src/main/java/solitaer/images/10Pik.png new file mode 100644 index 0000000000000000000000000000000000000000..fa6024a62ff2f893c71d3f995a76ac9b0fe78663 GIT binary patch literal 507 zcmeAS@N?(olHy`uVBq!ia0vp^oAt>Eakt!FczedZxkXmAEaXODqI>J#xUIau%5h>dgX@cS<>HDY)gy=s=qNiiytIc9ddhvd+Xkn8}voLRVT)4y$J?!z#{Ig zwpwoja}U=kyzy?WUA4hn^xF!E5kUFet7dP^5A6%Nv7DXa`Lmp_rTh`w*L8h;~)n>aY_r~Hw{{n#OrGd=+7NCRmubKg!FrDkSGqQDm zy|=P|TLxCj1$4MPhqcz56&n^G>f;(>jQEakt!Fcze<0>fz5!a2y z-}k==5wKgdb<5&I-fewSR#`7rEL;p^{MzDrKj-3X-Kwpw|Ic5Ty_Wsg+O_Oen_bs$ zd+}egYU@{*`P=5bI4idI)}sIEFD{GKZg$Pz_Tnm#U$rPaddpWA|LFNI-t*MnS_Bk6 zdrke<#;*?1{9lq^cm7Lw-T3d^h2^@x(z@^ETwJYNb*pN@a-i8j%Kk>xg8gP+GQ0QP zTx1^oC98YhHoJ?L#r__=#{9Q?p?~xjpoKSq=6~7p)nWfupaX3$*dx2tew!T7Eq|{8 ymG4GYp7omj?~O$eC&`+YT)7bF?9MyH82Z9T7x+zZkN*gaOa@O^KbLh*2~7Y>W#t9{ literal 0 HcmV?d00001 diff --git a/src/main/java/solitaer/images/11Karo.png b/src/main/java/solitaer/images/11Karo.png new file mode 100644 index 0000000000000000000000000000000000000000..422760bcef3faafc7f96a63829da8cf79b035983 GIT binary patch literal 518 zcmeAS@N?(olHy`uVBq!ia0vp^oA!>Eakt!FcyzVAkUR29|^G ze#`Ir-grPlGw#v)10j)yr@8{edNw6Z5na5dBB;xM$|E<;dzwe@Z+zrt*(I;(Ubt99 z|5V@~S?zn8(;s>66fyTI4D5U4ANg^K$b5~Xy+Jak0`F+N@9GZHnEq&Pk>8BccK$B;Q`g?us47#J? z4%E?GB+?!fGv$#d$PMe^mc&e1TmiIok%;)xiXb2@gCw^{!yV+J0FbnOP@j`!SAGP{ zaeIQh#Gl3%1_Hh1{ZUoh4aK(-sYf-2n9wWvJEakt!Fcze4I)|(X@76Tc-gA(mSZUnd1uGsKj{msf-ZGV^EYO@W!5xtf7 zcl{x|km`f`fOwwP8=&yt@WgnnH|<>2t2V5?)mFPA;4SNKFiw;Q$&0_yedFEwHz3hp zbXD$+;H}~yLhoNZR?vbgthE56xSZyJ8zi zi}zN2h$Kj{$hW13>Q-!6&Q-l~TVlTGH;{9HcyGw<4g5g8-cY?-Z-6e_8*(EaXfP13 z_|~*H^!A4REww8*08Ly8^bpXEakt!Fcze<0@@VF_(=N zzvH)X3CaCA@^)c$!O{(j5A|_bYrR>q;r{AviT~Xb<+a{)b5*bY)@HlPcEj33b^34C z-fH`+f7R^G+C%?BZf|hk%6nVu&G$q90^c^)uK0G~p4JNEfV literal 0 HcmV?d00001 diff --git a/src/main/java/solitaer/images/12Herz.png b/src/main/java/solitaer/images/12Herz.png new file mode 100644 index 0000000000000000000000000000000000000000..cfda3461d174a4f960546b2ad424cfb89ca2d98a GIT binary patch literal 509 zcmeAS@N?(olHy`uVBq!ia0vp^oAr>Eakt!FcyzU{(yLh|9*{ z-|<_XIW}kB=~Vy86_fd5#lppHeNt9gK!$(xm(16)wKo@)M}K+GQ@i==g8XfAUp9SR zFkQE5yX*gR7j~}|{}mtoWs~dsZ7=Ri{@UXDKf60_+l#wmdv8}QERWvu)k!~k{)_WG zwYL_{&$WG#`dYa5X4Qpj&HHlpUf>5BmELBTdlAG)?Y@_L@$|LkIEeZ3IkqqQd4am_ z1C{RvSq3sEwYzS^*9H3xzhrjTWxjU2pK}o?1yrD)d+|L`gFZ-ue>6YP89?U%4Fj63 z5480?NIZX=-Nn;DX92wu|KhY*?X6!f^=Zg{g?oAkF#a*GGg;)9cJIhFV6-xLy85}S Ib4q9e0Q%(v)&Kwi literal 0 HcmV?d00001 diff --git a/src/main/java/solitaer/images/12Karo.png b/src/main/java/solitaer/images/12Karo.png new file mode 100644 index 0000000000000000000000000000000000000000..d9f8a0bdd01cdd01dc5d68843dd77cec9c97dcb0 GIT binary patch literal 525 zcmeAS@N?(olHy`uVBq!ia0vp^oEakt!FcyzU{;JH!x4v< z|JuXY*ruhwfZ4>!(`(JT>)}0>yrWhS_KywbwklRHPlGt{liX6}l&Q-J|w36+vC^HQfs} zTZ=^Q2X}ez?BYKasNw!m7^K5|%HoQ^xGsH7{i91|jqv*GKbHfqR1c zoGd}AWxNVCk4_HS6WsMb4M^8`0!4vB?jIM)0PUF`WCJqZ{o{R*Rq9VQ=7AmPZQ12) z+2yUdZ;1@hX8S~t#(;T10ibufKdl4$B7e&2ABsSa8lLJ34C_Jh`%n^k#UGxs&Mz`t ROBoo=44$rjF6*2UngFMY+-?8> literal 0 HcmV?d00001 diff --git a/src/main/java/solitaer/images/12Kreuz.png b/src/main/java/solitaer/images/12Kreuz.png new file mode 100644 index 0000000000000000000000000000000000000000..a6356c803084f9df3f5493fccfcf48710b0db892 GIT binary patch literal 552 zcmeAS@N?(olHy`uVBq!ia0vp^oEakt!FcyzAeS_!nCr&s zZ~HTNMI>^xX8z-`(R{OF!{S4IT-I7Z#&oXgmETx@uh^h3`t5zo-&NZZ_pi#mvG`V- zt=1bL`PVuzewFQp|3QiUT-71BH`HsrS$gQ7cdM;d&gyN6@me9(2_Si(=B0<^uEuTX z2O9VrY=YBP-ru2b8-XS+ywz44aswznIZOJR;J2W}`taPtcB^U=KG!Z)Mkd6Zn?(HwQRC;2|?~ b82=e_eRyJv1X>;eQvidftDnm{r-UW|1-uLh literal 0 HcmV?d00001 diff --git a/src/main/java/solitaer/images/12Pik.png b/src/main/java/solitaer/images/12Pik.png new file mode 100644 index 0000000000000000000000000000000000000000..c57f94c6e7833bc0a408773c8590a376378402f3 GIT binary patch literal 494 zcmeAS@N?(olHy`uVBq!ia0vp^oEakt!FczeV-^d$n9ISM z@Af4;A|@VJPQ+~$w^w?zV#DG?eO%UBZ+@@Jy-~06X6d20Reu|5Lw@sChg2s-x7Nnr z$iHg#W_y|QciSR=_Z!}=dx2upxqd?|0%}zNYOP!S rtqEu^NZkgYOPgR`gZpuaFn-Ca3EcGC)fJHrj7J7fS3j3^P6B| literal 0 HcmV?d00001 diff --git a/src/main/java/solitaer/images/13Herz.png b/src/main/java/solitaer/images/13Herz.png new file mode 100644 index 0000000000000000000000000000000000000000..5362efaa30e3fb203258bf8480fa91f838b12f9f GIT binary patch literal 511 zcmeAS@N?(olHy`uVBq!ia0vp^oAv>Eakt!FcyzU{(yLh|9*{ z-|<_PJ#5UpBzgQNS4`%M6$=-)^+{P}0U7?$Uov0I*4|uH9{uG#&)=lit#uo}I`yv= zugbZ&TlZIa+r3=d7ya8_Y;=9U?Zth`Ut3)7->zDCTx{=cpbq}3?XEx~r*_eNkj($| z*N*Yq>@H4UD}JkLp?);~uVdG^|DL(9T=&<#YuvWmUfdP4-4^!(Vm?^z21stPF4!)R zF~`MflV7*~JBA{>_d}7VbCslG%;oyiH%7=5Kqk9cbu#-r8G>{G;E$I1O=H vJdja)>z9kYamkenfzIx{vZh0f@t?7A$r8W5*LRG85zFA|>gTe~DWM4f3ykYk literal 0 HcmV?d00001 diff --git a/src/main/java/solitaer/images/13Karo.png b/src/main/java/solitaer/images/13Karo.png new file mode 100644 index 0000000000000000000000000000000000000000..7945855e66a25d9492ab292f4be330f9849bfef0 GIT binary patch literal 527 zcmeAS@N?(olHy`uVBq!ia0vp^oEakt!FcyzU{;JH!x4v< z|JuXY*ruh%CmoM(Tem4`is<4s5~)WuwA~^9bbE)tQSvUmpw zJ#w||x}SX1`l;5wr6SXVVonAA(bAqbP~d2Fa06@ zR4Z&7(_WjCrryJ?~mc9ybCpf`YgM=ExZ1w9i1FhEakt!FcyzV3!Q10P9Ba z@Ag~7xTLC9eEfBJLeP!CME6!%(XtRALtpe;&|B_rfr;^2Z|-ycUU{qSZ%FQ8xvOSx z0u$wdBv35qZR20xR$Hw%fw_nOt=ur3>vud@I(jSb@1TXZm_Z6^S8f2BwBlP+ZOh(} z8}cF53G$+=a&P!wl>=h4klP#jxqb&F?q9hrQ66OFexTgqTkPM0fkptWv;}bw?F+f# z4de@b3regHPVCQ;28vGSs$Ti6323)>E681SK<t~eg0#4|?gg5BABf#SPRTtS zcPLKl&GIbiZ!5MX0xg7)zCbx32D${K%J+shP}lFK+7OW0AgBI5P`B!v1JJ;|3G#?= gfd|l#V0@L={=y$y_hZHvU>acXboFyt=akR{0P2hLRsaA1 literal 0 HcmV?d00001 diff --git a/src/main/java/solitaer/images/13Pik.png b/src/main/java/solitaer/images/13Pik.png new file mode 100644 index 0000000000000000000000000000000000000000..605141a81cf00f03aa591e7dc1c2ac5a34fc5f25 GIT binary patch literal 495 zcmeAS@N?(olHy`uVBq!ia0vp^oEakt!FczeV^%V!i0j7c zZ~HS$YYdLe2yuINaPpx(E^DnfD>f`Xv~T^bw!i&{>_Tp|XW1v{U%i*upT(cEdc%9} z>hRpd_d;)PaNo*X9dg4PMBd)8_Rv24H|<&cZ}dgKt=J&1^~SliHvUFC*YD+7(hz~b z#C|T2N_~#s0g3xpd^-@Q^=9dmK|sYoW;V$F zc#w+yD}eTiqYLl?)mVen>;~Dg4XEk2Yb(ga+{616Ku%ckjTvYbNOSAnkQ?GHvZ7@n iHv$vgTZb0oO8t|Scl@5-{wfQMNCr<=KbLh*2~7Y(*wmH) literal 0 HcmV?d00001 From 51d1e8c7abe21278bb7d9510f7e607c38bc66bdf Mon Sep 17 00:00:00 2001 From: Alexander Hartung Date: Wed, 26 Jan 2022 16:41:21 +0100 Subject: [PATCH 08/54] Add Offset for startStack --- src/main/java/solitaer/Card.java | 3 +++ src/main/java/solitaer/StartStack.java | 9 +++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/main/java/solitaer/Card.java b/src/main/java/solitaer/Card.java index a5b7128..63b1d8e 100644 --- a/src/main/java/solitaer/Card.java +++ b/src/main/java/solitaer/Card.java @@ -1,5 +1,6 @@ package solitaer; +import java.awt.Color; import java.awt.Graphics; import java.awt.Image; import java.util.Objects; @@ -113,6 +114,8 @@ public class Card extends JPanel { // TODO Auto-generated method stub super.paintComponent(g); g.drawImage(getImage(), 0, 0, this.getWidth(), this.getHeight(), this); + g.setColor(Color.black); + g.drawRect(0, 0, this.getWidth()-1, this.getHeight()-1); } } diff --git a/src/main/java/solitaer/StartStack.java b/src/main/java/solitaer/StartStack.java index 2ab0504..66a25c1 100644 --- a/src/main/java/solitaer/StartStack.java +++ b/src/main/java/solitaer/StartStack.java @@ -12,21 +12,26 @@ public class StartStack extends JPanel { private static final long serialVersionUID = 1L; private Image im; private ArrayList stack = new ArrayList(); + + private int offset; public StartStack(int _x, int _y) { super.setLocation(_x, _y); super.setSize(72, 450); super.setOpaque(false); super.setLayout(null); + + offset = 0; } public void addCard(Card _card) { + _card.setLocation(0, offset); stack.add(_card); - System.out.println("dfsfdsf"); addtoPanel(); + offset += 20; } - void addtoPanel() { + private void addtoPanel() { this.removeAll(); for(int i = stack.size()-1; i>=0; i-- ) { From 0fccd2aba9b4494f43c66e732623baf9fd195cca Mon Sep 17 00:00:00 2001 From: Alexander Hartung Date: Wed, 26 Jan 2022 16:57:10 +0100 Subject: [PATCH 09/54] add Image for empty stack --- src/main/java/solitaer/SolitaerGamePanel.java | 3 +++ src/main/java/solitaer/StartStack.java | 3 +-- src/main/java/solitaer/images/empty.png | Bin 0 -> 7063 bytes 3 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 src/main/java/solitaer/images/empty.png diff --git a/src/main/java/solitaer/SolitaerGamePanel.java b/src/main/java/solitaer/SolitaerGamePanel.java index 73fc4d0..3577a3a 100644 --- a/src/main/java/solitaer/SolitaerGamePanel.java +++ b/src/main/java/solitaer/SolitaerGamePanel.java @@ -19,6 +19,9 @@ public class SolitaerGamePanel extends JPanel { a.addCard(new Card(13, Symbol.Karo, true)); a.addCard(new Card(1, Symbol.Karo, true)); this.add(a); + + StartStack b = new StartStack(200,25); + this.add(b); } diff --git a/src/main/java/solitaer/StartStack.java b/src/main/java/solitaer/StartStack.java index 66a25c1..e2cf44c 100644 --- a/src/main/java/solitaer/StartStack.java +++ b/src/main/java/solitaer/StartStack.java @@ -35,7 +35,6 @@ public class StartStack extends JPanel { this.removeAll(); for(int i = stack.size()-1; i>=0; i-- ) { - System.out.println("for"); this.add(stack.get(i)); } } @@ -45,7 +44,7 @@ public class StartStack extends JPanel { // TODO Auto-generated method stub super.paintComponent(g); if (stack.size() == 0) { - ImageIcon ii = new ImageIcon(getClass().getResource("images/back.png")); + ImageIcon ii = new ImageIcon(getClass().getResource("images/empty.png")); im = ii.getImage(); g.drawImage(im, 0, 0, this.getWidth(), 96, this); } diff --git a/src/main/java/solitaer/images/empty.png b/src/main/java/solitaer/images/empty.png new file mode 100644 index 0000000000000000000000000000000000000000..f6c6284bb9bb498d64b9fdd3529d47fa7773de0a GIT binary patch literal 7063 zcmeHMc{tQv`=3g(L<%LT##pkAF@qVVL3SgPJ$ss!2{U76tZ8|K$gbU*ElUrwWlK>) zB&86_lBX0Z9$N_Scckt2zSr-%p6hzw|C+hZnS1W#bI$!a_c`-D*F;zxG8W(y=L3O2 z0$39RE8r6gG(69GpcnnP>j?~=lH zJ2buCE4iY+H+1>^wKGxd*Ow<@v-IM3%e7G$r^L#;f;A~h3Ci;5{K>ohwD}PqZ($X| z_{WcQ<6J93*l9x3vI9Ci3B%XKE%&!4UAxI^#gq=m9gsK%Mf&^MNM7`Qc~a-mfm80T zy#qv@rMpsNWc@dC@{!w)rPK4KK^7m(^$gKlr=b@wet6VTbvX4-bfPpV&d%3S(8hnd zrTX@4%ZKrL`IeZmYy5MKWfjA%WA`x516&zNpDjup=`sT@TPzD>M<3mFEHy45yYDEM zIp2%R%QMx=`UG*#y0P5EUtc$=`{Ul%eL*eH-Mq0UmqUI8&s0Z5s^0A zJlE=>P2bqr>#5lA`fN(q+r5%bnc%3mRkOINX331lfu!m`Mn)!Gr*1&DB+@A6e2p>! zTOWoO(8>d|sxw8&YHSHFT;*+Eu&`xM*wGNk7Nx^-QgRdx`4l0NvH5a@bhCA4e1tPN zD*mcm_TlG_$XVkL%%6geT*Kt&95BzrX1BDIHDCa0dKx0r;&K{48L}Wkd&x6mYL;h z+#*Cwz{;eUl{}P5(>teVn`T=?DZk;Q)pfH`skB98UrC$tq6AYZ!@^df`U)XZ@lMD# zMceZH{KD(KqxnVYjY-{Hfu+LcY3;SL*Skq`Hm&byM>5mUD8umWhs>sS2ACbw-Q(A` z!6uzN)$=;EYg?O7o7=&-=L%8Mrq7bk8%~J@SnQC*iJ}HRq}ELBDx=Kf4z;IOedObG z(Icr#v-dnSXTx%zXgyEFtBz*m&RbrW(+b#cn`R^0bye@u4eiEpc1sB$pRdhu|}4TVPgQZ9-fX_3y$+m#g6-t)Ok!|QN- zcZq_63;9@({3c%Uiw)wp^P?k8`8#S}1eD}x=(RaXW7p|gX4*w6ItWFo@f-fpRricA zo!evC(`Asvm*7~*lNDTseEPKWK)R;MdynjQZ(0aR%Od%FyFH3sa37?$s_hb$G@Z$A z?NksMXm^G$i5X13g7s!+m;@a;mpLSe)mSP5SU4hHxpuDWqB&4g}Iy)c-JdG zjTXzcE#%bB&> zOGS@3KI)fRiCT1eo-?rm`S@&tW^fYS2RXH6F-tuAQm2i0w(py=99qO*PwIkh78)!Z z7d+Rad01yWBbwzQJiak{C2+gP(kIPaCxyY%sNg!cog4pXF9~(jZk6K+x@0NzSt%1d z;b5fu!-(KppGLlRx*cHwIBWjjHc^+6OGJ0>9<0*Q=w9nFeR77?_Zi3-rR&nK9J)e} z=7O+GZ!Tekk6RTPLw%^Va+yx+V~I@%Dl?8tZ=TTbU2C&?b;B>MsV;SmuFm698YbGNRqmcMl zXg}}u?6_iHM}D_1ZWpUPPuTj;t&H2tWl*8VxlIq{`R&}4J()WL+dgL0(^9#i&LMc; zT$+qO7a$melK)L$D87CM4t5f#D+m_`y*#I}?iXS3?ylItxH}Kt?XlAro`#q_i#@gF z*;zT<{Y3P=X`Y2o_olaJMa+v`|0L36$yzx-u+0Ug7w1j*yLv{6s80IA7mrLUO>b;Jq7d<*_9Zc$ex*M*(rzKu za!1j$R;Kci_s5M~f=2rXoxP<#zWE`8abm4SL8s+o3%0Sn=@sO8xe&kg7ymk;F z#Z+~#6`|p*?mDt6Vs*fuKgFc8{q1e+~{!x34%81LuwH?duaLjR~ znXKj89W(MGBMX?%CH_ObW}lZaQ*kk8H%Fd3xOCw)&pN>e@ZA#Uq_{LhjCmMxF`=jR zy+c4}U)%GnDTD?szEB}6k7N;cMtM479G@D?F@SFr4A4=bCIkx9`ewlLSg?FuCYb4rdQU0`(8$!o<{yecc?h>ZBKSe(8+ctH}q;}{1&XX{veRg4BQ+IdXoWoV;$f^RHPyDa?5I$SqB4(aiRudXo zy){0g#0ST{fmS+m>(G)G?o7R?T6zUuNJNy~}y%DSdM zsq2DY_iua}v3hegv9 z1uLa>K4wqe6?t(ojUI$DXsDQq{uCDed1$C3NPm8oo0SH8b=~<>KYmYpcWPXGFs=zD==IO`#@&%IvYjxlm`FzxK=d(foboO~vGzl7VL&W4Y%3cET>9E&?@V|B;- zP`7a7ZyN&}P`BiteLp{ZOF*1Vsdt4=A{3X2o zyJnL$ZmafJyq+k9Y412|?z|YG5p=}*mzDLF&nWRMY+}cNlsE{q zE{v+LZ-Ld<|Mo}^Jjf@Xh}SZ?Zy^$DZfzKEx@o_Oce6#xpW)}i&)XF9Y&UgEx7~F9 z^0MyvFzE*mEE!OZ&!zT04DYVadRrl`QwJncl0{sy8Wt1uBE?{s{-%IAiT;``LgJ#= z6J3T+=Q|iF>=7=lvMnAF)ehO(AV!g)j7CfoxKn3*%wO5~S*E^uHRm>?7;t`_cD#Sg z`!K`Xx|mw(`{cO@{XeDU8%7#3xn1Hu$B&h?(vu?v`7x>_lGRj$B%%04J#$lOLi#rI zt;Qm@nL(0cCHDd%OC9ryyR_!{Hw1XewD~ydhZA{ur6u)@1jsf=B~5FL&P9l%G-1Br zo6@8&n-wC&G`CxX@;#h9vr_-5Co%LPFG^l$L$#~tB2nyJ&&EWbzGdxOAKvl~p5iVn zyLGo0MA60;Rg^bx6?)07T-cX*dz14=&>8b;l1a>8IWi)Ab&ESsSPP0(Zd~YkSylen zdjUjpKirC{tCv)<${P2H^_%m3{9z!q>&r>dVgs{ZQYn~o`4Xc7mn?gn8JbAKo}i=2A=3aW`hZ2H!4jF@~P%71WYAqLG09VDmaEd*_~<<$Rt|_9e{$m8o2Dq!jtjH|750gkX^d-~SQa?kGh~MKGK1|Qm zbVx)P*^}%AxUzsz;lB)NjKx`ekKjMge61;>o5`evtLc+&Gribbg))5dIza z7w>PmuQ~%>I2_u5PW0hS4{M+W;f#+a(TP+NdR0_K5fKEq1`>)=Q%6A6P$U9W1CJs= z$?9+-f<#s&tK(5WL1AeuHl9W#bD#ilWh#I}rl_c*Ch8tQG{Jtnx!+;fZHcfB;|*P-!H( zAM1z7hU!JOX5%@0!jWpK2si?+ss=Eks-p43=`fke0&0=8yoJoN>k*fs`#(Z5C6DkYv2;kKGTGd;Vy}y3@x(Pg~ zt0pjbwQ$jR;@3e~cwaJUbs!+_tBL52r@4`V9llml-}Kb~v|LCsu;ta&pz5l?va68^ z1gIuKlK>@=Nfcn|kz@oy{a17rox=9RGs(JcK&C)8Knbm81D0DOQ~pRDHULU ztH7ZMqzxR2R?|SMt3hCE$-+2$`dhXb*uU|CS#|j75CG!7>VU%qIICda534o4I28U5 zUu)~|KO6yo{yoS);`cXQzv=o%4E!VK-_`Y-u7AY9KXU$EUH>(@_$TZ*y$Pc*8 zd?+5m0~aA~!a-vL&KVKCeT*;)~F)2XG9V^ zr#&)5P^fn__+JpCtStZl literal 0 HcmV?d00001 From 8ccbb52a9a443fea1a8eae881684e8a57e4dd449 Mon Sep 17 00:00:00 2001 From: Alexander Hartung Date: Wed, 26 Jan 2022 18:13:42 +0100 Subject: [PATCH 10/54] Add Ruleset for startStack and Tests --- src/main/java/solitaer/StartStack.java | 35 +++++++++++++++--- src/test/java/solitaer/StartStackTest.java | 42 ++++++++++++++++++++++ 2 files changed, 72 insertions(+), 5 deletions(-) create mode 100644 src/test/java/solitaer/StartStackTest.java diff --git a/src/main/java/solitaer/StartStack.java b/src/main/java/solitaer/StartStack.java index e2cf44c..6a001ea 100644 --- a/src/main/java/solitaer/StartStack.java +++ b/src/main/java/solitaer/StartStack.java @@ -12,7 +12,7 @@ public class StartStack extends JPanel { private static final long serialVersionUID = 1L; private Image im; private ArrayList stack = new ArrayList(); - + private int offset; public StartStack(int _x, int _y) { @@ -20,21 +20,44 @@ public class StartStack extends JPanel { super.setSize(72, 450); super.setOpaque(false); super.setLayout(null); - + offset = 0; } + public boolean cardCheck(Card _topStack, Card _playerCard) { + if(_topStack == null && _playerCard == null) { + return false; + } + if (_topStack == null) { + // Nur der König kann auf einen leeren Stapel gelegt werden + return _playerCard.getNr() == 13; + }else { + return (// Nummer nur aufsteigend + _topStack.getNr() == _playerCard.getNr() + 1) + && + // rot auf Schwarz + ( + ((_topStack.getSymbol() == Symbol.Herz || _topStack.getSymbol() == Symbol.Karo) + && (_playerCard.getSymbol() == Symbol.Pik || _playerCard.getSymbol() == Symbol.Kreuz)) + || + // schwarz auf rot + ((_topStack.getSymbol() == Symbol.Pik || _topStack.getSymbol() == Symbol.Kreuz) + && (_playerCard.getSymbol() == Symbol.Herz || _playerCard.getSymbol() == Symbol.Karo)) + ); + } + } + public void addCard(Card _card) { _card.setLocation(0, offset); stack.add(_card); addtoPanel(); offset += 20; } - + private void addtoPanel() { - + this.removeAll(); - for(int i = stack.size()-1; i>=0; i-- ) { + for (int i = stack.size() - 1; i >= 0; i--) { this.add(stack.get(i)); } } @@ -44,7 +67,9 @@ public class StartStack extends JPanel { // TODO Auto-generated method stub super.paintComponent(g); if (stack.size() == 0) { + //Arcade64\src\main\java\solitaer\images ImageIcon ii = new ImageIcon(getClass().getResource("images/empty.png")); + //ImageIcon ii = new ImageIcon("C:/Users/Alexander/eclipse-workspace/Arcade64/src/main/java/solitaer/images/empty.png"); im = ii.getImage(); g.drawImage(im, 0, 0, this.getWidth(), 96, this); } diff --git a/src/test/java/solitaer/StartStackTest.java b/src/test/java/solitaer/StartStackTest.java new file mode 100644 index 0000000..bf65ff1 --- /dev/null +++ b/src/test/java/solitaer/StartStackTest.java @@ -0,0 +1,42 @@ +package solitaer; + +import static org.junit.jupiter.api.Assertions.*; + +import java.util.stream.Stream; + +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.Arguments; +import org.junit.jupiter.params.provider.MethodSource; + +class StartStackTest { + + @ParameterizedTest + @MethodSource("testStartStackTestDaten") + //Jedes Symbol muss einmal vorhand sein + void testRulesetStartStack(String msg, Card _stapel, Card _spieler, boolean _expectedResult) { + StartStack stack = new StartStack(10, 10); + + + assertEquals(_expectedResult, stack.cardCheck(_stapel, _spieler), msg); + } + + + private static Stream testStartStackTestDaten(){ + return Stream.of( + Arguments.of("Ass-Kreuz auf 2-Herz", new Card(2, Symbol.Herz, true), new Card(1, Symbol.Kreuz, true), true), + Arguments.of("Ass-Herz auf 2Herz", new Card(1, Symbol.Herz, true), new Card(2, Symbol.Herz, true), false), + Arguments.of("Ass-Kreuz auf leeres Feld", null, new Card(1, Symbol.Kreuz, true), false), + Arguments.of("König auf leeres Feld", null, new Card(13, Symbol.Kreuz, true), true), + Arguments.of("5-Pik auf 6-Karo", new Card(6, Symbol.Karo, true), new Card(5, Symbol.Pik, true), true), + Arguments.of("König-Karo auf Ass-Kreuz", new Card(1, Symbol.Kreuz, true), new Card(13, Symbol.Karo, true), false), + Arguments.of("5-Karo auf 7-Kreuz", new Card(7, Symbol.Kreuz, true), new Card(5, Symbol.Karo, true), false), + Arguments.of("2-Herz auf Ass-Kreuz", new Card(2, Symbol.Herz, true), new Card(1, Symbol.Kreuz, true), true), + Arguments.of("null auf null", null, null, false) + + ); + + + } + +} From 67d9ada9322950927d06cebb1b6444b48b9527de Mon Sep 17 00:00:00 2001 From: Alexander Hartung Date: Wed, 26 Jan 2022 21:19:33 +0100 Subject: [PATCH 11/54] Refactor Card and StartStack --- src/main/java/solitaer/Card.java | 10 +++++----- src/main/java/solitaer/StartStack.java | 12 +++++++----- src/test/java/solitaer/StartStackTest.java | 9 ++------- 3 files changed, 14 insertions(+), 17 deletions(-) diff --git a/src/main/java/solitaer/Card.java b/src/main/java/solitaer/Card.java index 63b1d8e..9eeec05 100644 --- a/src/main/java/solitaer/Card.java +++ b/src/main/java/solitaer/Card.java @@ -14,9 +14,6 @@ enum Symbol { public class Card extends JPanel { - /** - * - */ private static final long serialVersionUID = 1L; private int nr; private Symbol symbol; @@ -25,9 +22,12 @@ public class Card extends JPanel { private Image Up; private Image back; + + private final int IMAGE_WIDTH = 72; + private final int IMAGE_HIGHT = 96; public Card(int nr, Symbol symbol, boolean faceUp) { - this.setSize(72,96); + this.setSize(IMAGE_WIDTH,IMAGE_HIGHT); this.nr = nr; this.symbol = symbol; this.faceUp = faceUp; @@ -75,7 +75,7 @@ public class Card extends JPanel { case Kreuz: return "Kreuz"; default: - return null; + return ""; } } diff --git a/src/main/java/solitaer/StartStack.java b/src/main/java/solitaer/StartStack.java index 6a001ea..a4bd932 100644 --- a/src/main/java/solitaer/StartStack.java +++ b/src/main/java/solitaer/StartStack.java @@ -12,12 +12,16 @@ public class StartStack extends JPanel { private static final long serialVersionUID = 1L; private Image im; private ArrayList stack = new ArrayList(); + private final int OFFSET_VALUE = 20; + + private final int IMAGE_WIDTH = 72; + private final int IMAGE_HIGHT = 450; private int offset; public StartStack(int _x, int _y) { super.setLocation(_x, _y); - super.setSize(72, 450); + super.setSize(IMAGE_WIDTH, IMAGE_HIGHT); super.setOpaque(false); super.setLayout(null); @@ -51,12 +55,12 @@ public class StartStack extends JPanel { _card.setLocation(0, offset); stack.add(_card); addtoPanel(); - offset += 20; + offset += OFFSET_VALUE; } private void addtoPanel() { - this.removeAll(); + //Alles neu Zeichnen for (int i = stack.size() - 1; i >= 0; i--) { this.add(stack.get(i)); } @@ -67,9 +71,7 @@ public class StartStack extends JPanel { // TODO Auto-generated method stub super.paintComponent(g); if (stack.size() == 0) { - //Arcade64\src\main\java\solitaer\images ImageIcon ii = new ImageIcon(getClass().getResource("images/empty.png")); - //ImageIcon ii = new ImageIcon("C:/Users/Alexander/eclipse-workspace/Arcade64/src/main/java/solitaer/images/empty.png"); im = ii.getImage(); g.drawImage(im, 0, 0, this.getWidth(), 96, this); } diff --git a/src/test/java/solitaer/StartStackTest.java b/src/test/java/solitaer/StartStackTest.java index bf65ff1..e9515e8 100644 --- a/src/test/java/solitaer/StartStackTest.java +++ b/src/test/java/solitaer/StartStackTest.java @@ -4,7 +4,6 @@ import static org.junit.jupiter.api.Assertions.*; import java.util.stream.Stream; -import org.junit.jupiter.api.Test; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; @@ -16,8 +15,6 @@ class StartStackTest { //Jedes Symbol muss einmal vorhand sein void testRulesetStartStack(String msg, Card _stapel, Card _spieler, boolean _expectedResult) { StartStack stack = new StartStack(10, 10); - - assertEquals(_expectedResult, stack.cardCheck(_stapel, _spieler), msg); } @@ -25,7 +22,8 @@ class StartStackTest { private static Stream testStartStackTestDaten(){ return Stream.of( Arguments.of("Ass-Kreuz auf 2-Herz", new Card(2, Symbol.Herz, true), new Card(1, Symbol.Kreuz, true), true), - Arguments.of("Ass-Herz auf 2Herz", new Card(1, Symbol.Herz, true), new Card(2, Symbol.Herz, true), false), + Arguments.of("Ass-Herz auf 2-Herz", new Card(2, Symbol.Herz, true), new Card(1, Symbol.Herz, true), false), + Arguments.of("Ass-Herz auf 2-Herz", new Card(1, Symbol.Herz, true), new Card(2, Symbol.Herz, true), false), Arguments.of("Ass-Kreuz auf leeres Feld", null, new Card(1, Symbol.Kreuz, true), false), Arguments.of("König auf leeres Feld", null, new Card(13, Symbol.Kreuz, true), true), Arguments.of("5-Pik auf 6-Karo", new Card(6, Symbol.Karo, true), new Card(5, Symbol.Pik, true), true), @@ -33,10 +31,7 @@ class StartStackTest { Arguments.of("5-Karo auf 7-Kreuz", new Card(7, Symbol.Kreuz, true), new Card(5, Symbol.Karo, true), false), Arguments.of("2-Herz auf Ass-Kreuz", new Card(2, Symbol.Herz, true), new Card(1, Symbol.Kreuz, true), true), Arguments.of("null auf null", null, null, false) - ); - - } } From 7d0878431ed5b959c3fa6887396ac1e8773665ad Mon Sep 17 00:00:00 2001 From: Alexander Hartung Date: Wed, 26 Jan 2022 22:25:26 +0100 Subject: [PATCH 12/54] Fix Card and StartStack DRAW --- src/main/java/solitaer/Card.java | 54 ++++++++++++++------------ src/main/java/solitaer/StartStack.java | 12 +++--- 2 files changed, 35 insertions(+), 31 deletions(-) diff --git a/src/main/java/solitaer/Card.java b/src/main/java/solitaer/Card.java index 9eeec05..1933d7a 100644 --- a/src/main/java/solitaer/Card.java +++ b/src/main/java/solitaer/Card.java @@ -2,10 +2,8 @@ package solitaer; import java.awt.Color; import java.awt.Graphics; -import java.awt.Image; import java.util.Objects; -import javax.swing.ImageIcon; import javax.swing.JPanel; enum Symbol { @@ -19,9 +17,6 @@ public class Card extends JPanel { private Symbol symbol; private boolean faceUp; - - private Image Up; - private Image back; private final int IMAGE_WIDTH = 72; private final int IMAGE_HIGHT = 96; @@ -31,13 +26,6 @@ public class Card extends JPanel { this.nr = nr; this.symbol = symbol; this.faceUp = faceUp; - - String cardName = "" + getFileNr() + getFileSymbole(); - ImageIcon iiup = new ImageIcon(getClass().getResource("images/" + cardName + ".png")); - Up = iiup.getImage(); - - ImageIcon iiback = new ImageIcon(getClass().getResource("images/back.png")); - back = iiback.getImage(); } public boolean isFaceUp() { @@ -52,7 +40,7 @@ public class Card extends JPanel { return nr; } - private String getFileNr() { + private String getNrText() { if (this.nr < 10) { return "0" + this.nr; } else { @@ -64,7 +52,7 @@ public class Card extends JPanel { return symbol; } - private String getFileSymbole() { + private String getSymboleText() { switch (this.symbol) { case Herz: return "Herz"; @@ -79,14 +67,6 @@ public class Card extends JPanel { } } - public Image getImage() { - if (faceUp) { - return Up; - } else { - return back; - } - } - @Override public String toString() { return "Card [nr=" + nr + ", symbol=" + symbol + ", faceUp=" + faceUp + "]"; @@ -113,9 +93,33 @@ public class Card extends JPanel { protected void paintComponent(Graphics g) { // TODO Auto-generated method stub super.paintComponent(g); - g.drawImage(getImage(), 0, 0, this.getWidth(), this.getHeight(), this); - g.setColor(Color.black); - g.drawRect(0, 0, this.getWidth()-1, this.getHeight()-1); + paintCard(g); + + } + + + private void paintCard(Graphics g) { + if (faceUp) { + g.setColor(Color.white); + g.fillRect(0, 0, this.getWidth(), this.getHeight()); + + g.setColor(Color.black); + g.drawRect(0, 0, this.getWidth() - 1, this.getHeight() - 1); + + if (this.symbol == Symbol.Herz || this.symbol == Symbol.Karo) + g.setColor(Color.red); + else + g.setColor(Color.black); + + String text = "" + this.getNrText() + " " + this.getSymboleText(); + g.drawString(text, 3, 15); + } else { + g.setColor(Color.blue); + g.fillRect(0, 0, this.getWidth(), this.getHeight()); + + g.setColor(Color.black); + g.drawRect(0, 0, this.getWidth() - 1, this.getHeight() - 1); + } } } diff --git a/src/main/java/solitaer/StartStack.java b/src/main/java/solitaer/StartStack.java index a4bd932..7bc782e 100644 --- a/src/main/java/solitaer/StartStack.java +++ b/src/main/java/solitaer/StartStack.java @@ -1,16 +1,14 @@ package solitaer; +import java.awt.Color; import java.awt.Graphics; -import java.awt.Image; import java.util.ArrayList; -import javax.swing.ImageIcon; import javax.swing.JPanel; public class StartStack extends JPanel { private static final long serialVersionUID = 1L; - private Image im; private ArrayList stack = new ArrayList(); private final int OFFSET_VALUE = 20; @@ -71,9 +69,11 @@ public class StartStack extends JPanel { // TODO Auto-generated method stub super.paintComponent(g); if (stack.size() == 0) { - ImageIcon ii = new ImageIcon(getClass().getResource("images/empty.png")); - im = ii.getImage(); - g.drawImage(im, 0, 0, this.getWidth(), 96, this); + g.setColor(Color.gray); + g.fillRect(0, 0, this.getWidth(), 96); + + g.setColor(Color.black); + g.drawRect(0, 0, this.getWidth()-1, 96-1); } } From 7caebafde98f0a0534788cce725aadf29f99395a Mon Sep 17 00:00:00 2001 From: Alexander Hartung Date: Wed, 26 Jan 2022 23:43:32 +0100 Subject: [PATCH 13/54] Add MouseListener --- src/main/java/solitaer/MyMouseListener.java | 60 +++++++++++++++++++ src/main/java/solitaer/SolitaerGamePanel.java | 19 ++++-- 2 files changed, 74 insertions(+), 5 deletions(-) create mode 100644 src/main/java/solitaer/MyMouseListener.java diff --git a/src/main/java/solitaer/MyMouseListener.java b/src/main/java/solitaer/MyMouseListener.java new file mode 100644 index 0000000..a5db8af --- /dev/null +++ b/src/main/java/solitaer/MyMouseListener.java @@ -0,0 +1,60 @@ +package solitaer; + +import java.awt.Component; +import java.awt.event.MouseEvent; + +import javax.swing.SwingUtilities; +import javax.swing.event.MouseInputListener; + +public class MyMouseListener implements MouseInputListener { + + @Override + public void mouseClicked(MouseEvent e) { + // TODO Auto-generated method stub + + } + + @Override + public void mousePressed(MouseEvent e) { + // TODO Auto-generated method stub + System.out.println("DOWN"); + Component com = SwingUtilities.getDeepestComponentAt( + e.getComponent(), e.getX(), e.getY()); + System.out.println("########"); + System.out.println(com.toString()); + System.out.println(com.getParent().toString()); + System.out.println("########"); + + } + + @Override + public void mouseReleased(MouseEvent e) { + // TODO Auto-generated method stub + + } + + @Override + public void mouseEntered(MouseEvent e) { + // TODO Auto-generated method stub + + } + + @Override + public void mouseExited(MouseEvent e) { + // TODO Auto-generated method stub + + } + + @Override + public void mouseDragged(MouseEvent e) { + // TODO Auto-generated method stub + + } + + @Override + public void mouseMoved(MouseEvent e) { + // TODO Auto-generated method stub + + } + +} diff --git a/src/main/java/solitaer/SolitaerGamePanel.java b/src/main/java/solitaer/SolitaerGamePanel.java index 3577a3a..bfe5a90 100644 --- a/src/main/java/solitaer/SolitaerGamePanel.java +++ b/src/main/java/solitaer/SolitaerGamePanel.java @@ -7,17 +7,26 @@ import javax.swing.JPanel; public class SolitaerGamePanel extends JPanel { - /** - * - */ private static final long serialVersionUID = 1L; + private CardDeck deck; + private MyMouseListener mouseL; public SolitaerGamePanel() { setLayout(null); + + mouseL = new MyMouseListener(); + this.addMouseListener(mouseL); + + + deck = new CardDeck(); + + + StartStack a = new StartStack(25,25); - a.addCard(new Card(13, Symbol.Karo, true)); - a.addCard(new Card(1, Symbol.Karo, true)); + a.addCard(deck.getDeck().get(0)); + deck.getDeck().get(1).setFaceUp(true); + a.addCard((deck.getDeck().get(1))); this.add(a); StartStack b = new StartStack(200,25); From 421cd8903f8d74d48dbad28bd7e969f4382f7a1f Mon Sep 17 00:00:00 2001 From: Alexander Hartung Date: Thu, 27 Jan 2022 21:28:46 +0100 Subject: [PATCH 14/54] Add BaseStack Refactor StartStack --- src/main/java/solitaer/BaseStack.java | 49 +++++++++++++++++++++ src/main/java/solitaer/MyMouseListener.java | 20 +++++++-- src/main/java/solitaer/StartStack.java | 29 +++--------- 3 files changed, 71 insertions(+), 27 deletions(-) create mode 100644 src/main/java/solitaer/BaseStack.java diff --git a/src/main/java/solitaer/BaseStack.java b/src/main/java/solitaer/BaseStack.java new file mode 100644 index 0000000..7300cb9 --- /dev/null +++ b/src/main/java/solitaer/BaseStack.java @@ -0,0 +1,49 @@ +package solitaer; + +import java.util.ArrayList; + +import javax.swing.JPanel; + +public abstract class BaseStack extends JPanel { + private static final long serialVersionUID = 1L; + private ArrayList stack = new ArrayList(); + private final int OFFSET_VALUE = 20; + int offset; + + public BaseStack() { + // TODO Auto-generated constructor stub + offset = 0; + } + + public boolean stackIsEmpty() { + return stack.isEmpty(); + } + + public void addCard(Card _card) { + _card.setLocation(0, offset); + stack.add(_card); + RenderStackNew(); + offset += OFFSET_VALUE; + } + + private void RenderStackNew() { + this.removeAll(); + // Alles neu Zeichnen + for (int i = stack.size() - 1; i >= 0; i--) { + this.add(stack.get(i)); + } + this.repaint(); + } + + public Card removeLastCard() { + if (stack.size() != 0) { + Card LastCard = stack.remove(stack.size() - 1); + RenderStackNew(); + return LastCard; + } + return null; + + } + + protected abstract boolean cardCheck(Card _topStack, Card _playerCard); +} diff --git a/src/main/java/solitaer/MyMouseListener.java b/src/main/java/solitaer/MyMouseListener.java index a5db8af..7a29a4b 100644 --- a/src/main/java/solitaer/MyMouseListener.java +++ b/src/main/java/solitaer/MyMouseListener.java @@ -20,10 +20,22 @@ public class MyMouseListener implements MouseInputListener { System.out.println("DOWN"); Component com = SwingUtilities.getDeepestComponentAt( e.getComponent(), e.getX(), e.getY()); - System.out.println("########"); - System.out.println(com.toString()); - System.out.println(com.getParent().toString()); - System.out.println("########"); +// System.out.println("########"); +// System.out.println(com.toString()); +// System.out.println(com.getParent().toString()); +// System.out.println("########"); + + //Leeres StartFeld + if (com instanceof StartStack) { + System.out.println("Leer Start"); + + } + //Karte, die in einem StartStack liegt + else if(com instanceof Card && com.getParent() instanceof StartStack) { + System.out.println("Karte in StartStack"+com.toString()); + + ((BaseStack)com.getParent()).removeLastCard(); + } } diff --git a/src/main/java/solitaer/StartStack.java b/src/main/java/solitaer/StartStack.java index 7bc782e..28710e4 100644 --- a/src/main/java/solitaer/StartStack.java +++ b/src/main/java/solitaer/StartStack.java @@ -2,28 +2,22 @@ package solitaer; import java.awt.Color; import java.awt.Graphics; -import java.util.ArrayList; -import javax.swing.JPanel; -public class StartStack extends JPanel { +public class StartStack extends BaseStack { private static final long serialVersionUID = 1L; - private ArrayList stack = new ArrayList(); - private final int OFFSET_VALUE = 20; private final int IMAGE_WIDTH = 72; private final int IMAGE_HIGHT = 450; - private int offset; public StartStack(int _x, int _y) { + super(); super.setLocation(_x, _y); super.setSize(IMAGE_WIDTH, IMAGE_HIGHT); super.setOpaque(false); super.setLayout(null); - - offset = 0; } public boolean cardCheck(Card _topStack, Card _playerCard) { @@ -49,26 +43,13 @@ public class StartStack extends JPanel { } } - public void addCard(Card _card) { - _card.setLocation(0, offset); - stack.add(_card); - addtoPanel(); - offset += OFFSET_VALUE; - } - - private void addtoPanel() { - this.removeAll(); - //Alles neu Zeichnen - for (int i = stack.size() - 1; i >= 0; i--) { - this.add(stack.get(i)); - } - } + @Override protected void paintComponent(Graphics g) { // TODO Auto-generated method stub super.paintComponent(g); - if (stack.size() == 0) { + if (stackIsEmpty()) { g.setColor(Color.gray); g.fillRect(0, 0, this.getWidth(), 96); @@ -77,4 +58,6 @@ public class StartStack extends JPanel { } } + + } From b11a6244b7c46f61a67639808486d63ef9eb07d2 Mon Sep 17 00:00:00 2001 From: Alexander Hartung Date: Thu, 27 Jan 2022 22:00:44 +0100 Subject: [PATCH 15/54] Turn Card with Mouse --- src/main/java/solitaer/BaseStack.java | 9 +++++ src/main/java/solitaer/Card.java | 3 +- src/main/java/solitaer/MyMouseListener.java | 31 ++++++++++++++- src/main/java/solitaer/SaveStack.java | 38 +++++++++++++++++++ src/main/java/solitaer/SolitaerGamePanel.java | 12 +++++- 5 files changed, 88 insertions(+), 5 deletions(-) create mode 100644 src/main/java/solitaer/SaveStack.java diff --git a/src/main/java/solitaer/BaseStack.java b/src/main/java/solitaer/BaseStack.java index 7300cb9..aabbc6f 100644 --- a/src/main/java/solitaer/BaseStack.java +++ b/src/main/java/solitaer/BaseStack.java @@ -18,6 +18,15 @@ public abstract class BaseStack extends JPanel { public boolean stackIsEmpty() { return stack.isEmpty(); } + + public Card peekLastCard() { + if(!stackIsEmpty()) { + return stack.get(stack.size()-1); + } else { + return null; + } + + } public void addCard(Card _card) { _card.setLocation(0, offset); diff --git a/src/main/java/solitaer/Card.java b/src/main/java/solitaer/Card.java index 1933d7a..af55cfc 100644 --- a/src/main/java/solitaer/Card.java +++ b/src/main/java/solitaer/Card.java @@ -69,7 +69,8 @@ public class Card extends JPanel { @Override public String toString() { - return "Card [nr=" + nr + ", symbol=" + symbol + ", faceUp=" + faceUp + "]"; + //return "Card [nr=" + nr + ", symbol=" + symbol + ", faceUp=" + faceUp + "]"; + return "Card NR="+nr+" | Symbole="+symbol+" | Face="+faceUp; } @Override diff --git a/src/main/java/solitaer/MyMouseListener.java b/src/main/java/solitaer/MyMouseListener.java index 7a29a4b..140c2a9 100644 --- a/src/main/java/solitaer/MyMouseListener.java +++ b/src/main/java/solitaer/MyMouseListener.java @@ -7,6 +7,15 @@ import javax.swing.SwingUtilities; import javax.swing.event.MouseInputListener; public class MyMouseListener implements MouseInputListener { + + private SaveStack save; + private BaseStack tempStack; + private Card tempCard; + + public MyMouseListener(SaveStack _save) { + // TODO Auto-generated constructor stub + this.save = _save; + } @Override public void mouseClicked(MouseEvent e) { @@ -32,9 +41,27 @@ public class MyMouseListener implements MouseInputListener { } //Karte, die in einem StartStack liegt else if(com instanceof Card && com.getParent() instanceof StartStack) { - System.out.println("Karte in StartStack"+com.toString()); + tempCard = (Card) com; + tempStack = (StartStack) com.getParent(); + + //Wenn faceDown, schau ob es die oberste Carde ist und dreh diese um + if(!tempCard.isFaceUp()) { + if(tempStack.peekLastCard().equals(tempCard)) { + tempCard.setFaceUp(true); + tempCard.repaint(); + System.out.println("Turn"+tempCard.toString()); + } + + + } + + + //System.out.println("Karte in StartStack"+com.toString()); + + + - ((BaseStack)com.getParent()).removeLastCard(); + //save.addCard(((BaseStack)com.getParent()).removeLastCard());; } } diff --git a/src/main/java/solitaer/SaveStack.java b/src/main/java/solitaer/SaveStack.java new file mode 100644 index 0000000..d95974f --- /dev/null +++ b/src/main/java/solitaer/SaveStack.java @@ -0,0 +1,38 @@ +package solitaer; + +import java.awt.Color; +import java.awt.Graphics; + +public class SaveStack extends BaseStack { + + private static final long serialVersionUID = 1L; + + public SaveStack(int _x, int _y) { + // TODO Auto-generated constructor stub + super(); + super.setLocation(_x, _y); + super.setSize(72, 450); + super.setOpaque(false); + super.setLayout(null); + } + + @Override + protected boolean cardCheck(Card _topStack, Card _playerCard) { + // TODO Auto-generated method stub + return false; + } + + @Override + protected void paintComponent(Graphics g) { + // TODO Auto-generated method stub + super.paintComponent(g); + if (stackIsEmpty()) { + g.setColor(Color.pink); + g.fillRect(0, 0, this.getWidth(), 96); + + g.setColor(Color.black); + g.drawRect(0, 0, this.getWidth() - 1, 96 - 1); + } + } + +} diff --git a/src/main/java/solitaer/SolitaerGamePanel.java b/src/main/java/solitaer/SolitaerGamePanel.java index bfe5a90..14ab7cf 100644 --- a/src/main/java/solitaer/SolitaerGamePanel.java +++ b/src/main/java/solitaer/SolitaerGamePanel.java @@ -10,12 +10,14 @@ public class SolitaerGamePanel extends JPanel { private static final long serialVersionUID = 1L; private CardDeck deck; private MyMouseListener mouseL; + + private SaveStack save =new SaveStack(500,250); public SolitaerGamePanel() { setLayout(null); - mouseL = new MyMouseListener(); + mouseL = new MyMouseListener(save); this.addMouseListener(mouseL); @@ -25,12 +27,18 @@ public class SolitaerGamePanel extends JPanel { StartStack a = new StartStack(25,25); a.addCard(deck.getDeck().get(0)); - deck.getDeck().get(1).setFaceUp(true); + deck.getDeck().get(1).setFaceUp(false); a.addCard((deck.getDeck().get(1))); this.add(a); StartStack b = new StartStack(200,25); this.add(b); + + //save = new SaveStack(500,250); + this.add(save); + + + } From cc51b3fa681756768b2a561b4642d8b6fed0d167 Mon Sep 17 00:00:00 2001 From: Alexander Hartung Date: Thu, 27 Jan 2022 22:36:28 +0100 Subject: [PATCH 16/54] Move Cards between StartStack with Mouse --- src/main/java/solitaer/BaseStack.java | 31 +++++--- src/main/java/solitaer/MyMouseListener.java | 73 +++++++++++-------- src/main/java/solitaer/SolitaerGamePanel.java | 26 ++++++- 3 files changed, 89 insertions(+), 41 deletions(-) diff --git a/src/main/java/solitaer/BaseStack.java b/src/main/java/solitaer/BaseStack.java index aabbc6f..e8064d0 100644 --- a/src/main/java/solitaer/BaseStack.java +++ b/src/main/java/solitaer/BaseStack.java @@ -1,5 +1,7 @@ package solitaer; +import java.lang.invoke.TypeDescriptor.OfField; +import java.time.OffsetDateTime; import java.util.ArrayList; import javax.swing.JPanel; @@ -25,7 +27,14 @@ public abstract class BaseStack extends JPanel { } else { return null; } - + } + + public int indexOfCard(Card _card) { + return stack.indexOf(_card); + } + + public int stackSize() { + return stack.size(); } public void addCard(Card _card) { @@ -35,23 +44,23 @@ public abstract class BaseStack extends JPanel { offset += OFFSET_VALUE; } - private void RenderStackNew() { - this.removeAll(); - // Alles neu Zeichnen - for (int i = stack.size() - 1; i >= 0; i--) { - this.add(stack.get(i)); - } - this.repaint(); - } - public Card removeLastCard() { if (stack.size() != 0) { Card LastCard = stack.remove(stack.size() - 1); + offset -= OFFSET_VALUE; RenderStackNew(); return LastCard; } return null; - + } + + private void RenderStackNew() { + this.removeAll(); + // Alles neu Zeichnen + for (int i = stack.size() - 1; i >= 0; i--) { + this.add(stack.get(i)); + } + this.repaint(); } protected abstract boolean cardCheck(Card _topStack, Card _playerCard); diff --git a/src/main/java/solitaer/MyMouseListener.java b/src/main/java/solitaer/MyMouseListener.java index 140c2a9..4ca99b8 100644 --- a/src/main/java/solitaer/MyMouseListener.java +++ b/src/main/java/solitaer/MyMouseListener.java @@ -7,11 +7,12 @@ import javax.swing.SwingUtilities; import javax.swing.event.MouseInputListener; public class MyMouseListener implements MouseInputListener { - + private SaveStack save; private BaseStack tempStack; + private BaseStack selectedStack; private Card tempCard; - + public MyMouseListener(SaveStack _save) { // TODO Auto-generated constructor stub this.save = _save; @@ -27,41 +28,55 @@ public class MyMouseListener implements MouseInputListener { public void mousePressed(MouseEvent e) { // TODO Auto-generated method stub System.out.println("DOWN"); - Component com = SwingUtilities.getDeepestComponentAt( - e.getComponent(), e.getX(), e.getY()); -// System.out.println("########"); -// System.out.println(com.toString()); -// System.out.println(com.getParent().toString()); -// System.out.println("########"); - - //Leeres StartFeld + Component com = SwingUtilities.getDeepestComponentAt(e.getComponent(), e.getX(), e.getY()); + + // Leeres StartFeld if (com instanceof StartStack) { System.out.println("Leer Start"); - + } - //Karte, die in einem StartStack liegt - else if(com instanceof Card && com.getParent() instanceof StartStack) { + // Karte, die in einem StartStack liegt + else if (com instanceof Card && com.getParent() instanceof StartStack) { tempCard = (Card) com; tempStack = (StartStack) com.getParent(); - - //Wenn faceDown, schau ob es die oberste Carde ist und dreh diese um - if(!tempCard.isFaceUp()) { - if(tempStack.peekLastCard().equals(tempCard)) { - tempCard.setFaceUp(true); - tempCard.repaint(); - System.out.println("Turn"+tempCard.toString()); + + if (save.stackIsEmpty()) { + // Wenn faceDown, schau ob es die oberste Carde ist und dreh diese um + if (!tempCard.isFaceUp()) { + if (tempStack.peekLastCard().equals(tempCard)) { + tempCard.setFaceUp(true); + tempCard.repaint(); + } + } + // Card faceUp + else { + // move all Cards below the selected Card to Save + int index = tempStack.indexOfCard(tempCard); + while (tempStack.stackSize() - 1 >= index) { + save.addCard(tempStack.removeLastCard()); + } + selectedStack = tempStack; + + } + } + //saveStack is NOT empty + else { + if(selectedStack == null) { + System.out.println("ERROR selectedStack in StartStack"); + } + if(tempStack.cardCheck(tempStack.peekLastCard(), save.peekLastCard())) { + while(!save.stackIsEmpty()) { + tempStack.addCard(save.removeLastCard()); + } + } else { + //Alles wieder auf den Ursprünglichen Stack packen + while(!save.stackIsEmpty()) { + selectedStack.addCard(save.removeLastCard()); + } } - + selectedStack = null; } - - - //System.out.println("Karte in StartStack"+com.toString()); - - - - - //save.addCard(((BaseStack)com.getParent()).removeLastCard());; } } diff --git a/src/main/java/solitaer/SolitaerGamePanel.java b/src/main/java/solitaer/SolitaerGamePanel.java index 14ab7cf..d94b99c 100644 --- a/src/main/java/solitaer/SolitaerGamePanel.java +++ b/src/main/java/solitaer/SolitaerGamePanel.java @@ -26,14 +26,38 @@ public class SolitaerGamePanel extends JPanel { StartStack a = new StartStack(25,25); + a.addCard(deck.getDeck().get(0)); - deck.getDeck().get(1).setFaceUp(false); + + deck.getDeck().get(5).setFaceUp(true); + a.addCard((deck.getDeck().get(5))); + + deck.getDeck().get(4).setFaceUp(true); + a.addCard((deck.getDeck().get(4))); + + deck.getDeck().get(3).setFaceUp(true); + a.addCard((deck.getDeck().get(3))); + + deck.getDeck().get(2).setFaceUp(true); + a.addCard((deck.getDeck().get(2))); + + deck.getDeck().get(1).setFaceUp(true); a.addCard((deck.getDeck().get(1))); + this.add(a); StartStack b = new StartStack(200,25); + + deck.getDeck().get(32).setFaceUp(true); + b.addCard((deck.getDeck().get(32))); this.add(b); + StartStack c = new StartStack(375,25); + + deck.getDeck().get(33).setFaceUp(true); + c.addCard((deck.getDeck().get(33))); + this.add(c); + //save = new SaveStack(500,250); this.add(save); From 5aab0411798e7bbd41c70e75d0a2bfc51972ce0e Mon Sep 17 00:00:00 2001 From: Alexander Hartung Date: Thu, 27 Jan 2022 22:51:55 +0100 Subject: [PATCH 17/54] Refactor Start- Save- BaseStack and MyMousListener --- src/main/java/solitaer/BaseStack.java | 6 ++++-- src/main/java/solitaer/MyMouseListener.java | 18 +++++++++--------- src/main/java/solitaer/SaveStack.java | 6 +++--- src/main/java/solitaer/StartStack.java | 10 +++------- 4 files changed, 19 insertions(+), 21 deletions(-) diff --git a/src/main/java/solitaer/BaseStack.java b/src/main/java/solitaer/BaseStack.java index e8064d0..84dfab2 100644 --- a/src/main/java/solitaer/BaseStack.java +++ b/src/main/java/solitaer/BaseStack.java @@ -1,12 +1,14 @@ package solitaer; -import java.lang.invoke.TypeDescriptor.OfField; -import java.time.OffsetDateTime; import java.util.ArrayList; import javax.swing.JPanel; public abstract class BaseStack extends JPanel { + public final int IMAGE_WIDTH = 72; + public final int IMAGE_HIGHT = 96; + public final int STACK_HIGHT = 450; + private static final long serialVersionUID = 1L; private ArrayList stack = new ArrayList(); private final int OFFSET_VALUE = 20; diff --git a/src/main/java/solitaer/MyMouseListener.java b/src/main/java/solitaer/MyMouseListener.java index 4ca99b8..4e9a08a 100644 --- a/src/main/java/solitaer/MyMouseListener.java +++ b/src/main/java/solitaer/MyMouseListener.java @@ -8,14 +8,14 @@ import javax.swing.event.MouseInputListener; public class MyMouseListener implements MouseInputListener { - private SaveStack save; + private SaveStack saveStack; private BaseStack tempStack; private BaseStack selectedStack; private Card tempCard; public MyMouseListener(SaveStack _save) { // TODO Auto-generated constructor stub - this.save = _save; + this.saveStack = _save; } @Override @@ -40,7 +40,7 @@ public class MyMouseListener implements MouseInputListener { tempCard = (Card) com; tempStack = (StartStack) com.getParent(); - if (save.stackIsEmpty()) { + if (saveStack.stackIsEmpty()) { // Wenn faceDown, schau ob es die oberste Carde ist und dreh diese um if (!tempCard.isFaceUp()) { if (tempStack.peekLastCard().equals(tempCard)) { @@ -53,7 +53,7 @@ public class MyMouseListener implements MouseInputListener { // move all Cards below the selected Card to Save int index = tempStack.indexOfCard(tempCard); while (tempStack.stackSize() - 1 >= index) { - save.addCard(tempStack.removeLastCard()); + saveStack.addCard(tempStack.removeLastCard()); } selectedStack = tempStack; @@ -64,14 +64,14 @@ public class MyMouseListener implements MouseInputListener { if(selectedStack == null) { System.out.println("ERROR selectedStack in StartStack"); } - if(tempStack.cardCheck(tempStack.peekLastCard(), save.peekLastCard())) { - while(!save.stackIsEmpty()) { - tempStack.addCard(save.removeLastCard()); + if(tempStack.cardCheck(tempStack.peekLastCard(), saveStack.peekLastCard())) { + while(!saveStack.stackIsEmpty()) { + tempStack.addCard(saveStack.removeLastCard()); } } else { //Alles wieder auf den Ursprünglichen Stack packen - while(!save.stackIsEmpty()) { - selectedStack.addCard(save.removeLastCard()); + while(!saveStack.stackIsEmpty()) { + selectedStack.addCard(saveStack.removeLastCard()); } } diff --git a/src/main/java/solitaer/SaveStack.java b/src/main/java/solitaer/SaveStack.java index d95974f..3f423a2 100644 --- a/src/main/java/solitaer/SaveStack.java +++ b/src/main/java/solitaer/SaveStack.java @@ -11,7 +11,7 @@ public class SaveStack extends BaseStack { // TODO Auto-generated constructor stub super(); super.setLocation(_x, _y); - super.setSize(72, 450); + super.setSize(IMAGE_WIDTH, STACK_HIGHT); super.setOpaque(false); super.setLayout(null); } @@ -28,10 +28,10 @@ public class SaveStack extends BaseStack { super.paintComponent(g); if (stackIsEmpty()) { g.setColor(Color.pink); - g.fillRect(0, 0, this.getWidth(), 96); + g.fillRect(0, 0, this.getWidth(), IMAGE_HIGHT); g.setColor(Color.black); - g.drawRect(0, 0, this.getWidth() - 1, 96 - 1); + g.drawRect(0, 0, this.getWidth() - 1, IMAGE_HIGHT - 1); } } diff --git a/src/main/java/solitaer/StartStack.java b/src/main/java/solitaer/StartStack.java index 28710e4..8f14ae6 100644 --- a/src/main/java/solitaer/StartStack.java +++ b/src/main/java/solitaer/StartStack.java @@ -8,14 +8,10 @@ public class StartStack extends BaseStack { private static final long serialVersionUID = 1L; - private final int IMAGE_WIDTH = 72; - private final int IMAGE_HIGHT = 450; - - public StartStack(int _x, int _y) { super(); super.setLocation(_x, _y); - super.setSize(IMAGE_WIDTH, IMAGE_HIGHT); + super.setSize(IMAGE_WIDTH, STACK_HIGHT); super.setOpaque(false); super.setLayout(null); } @@ -51,10 +47,10 @@ public class StartStack extends BaseStack { super.paintComponent(g); if (stackIsEmpty()) { g.setColor(Color.gray); - g.fillRect(0, 0, this.getWidth(), 96); + g.fillRect(0, 0, this.getWidth(), IMAGE_HIGHT); g.setColor(Color.black); - g.drawRect(0, 0, this.getWidth()-1, 96-1); + g.drawRect(0, 0, this.getWidth()-1, IMAGE_HIGHT-1); } } From 65a829fbff195e5445f35bd0c37368a2a828e4de Mon Sep 17 00:00:00 2001 From: Alexander Hartung Date: Sat, 29 Jan 2022 16:37:22 +0100 Subject: [PATCH 18/54] init AblageStack --- src/main/java/solitaer/AblageStack.java | 21 ++++++++++++++++ src/test/java/solitaer/AblageStackTest.java | 28 +++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 src/main/java/solitaer/AblageStack.java create mode 100644 src/test/java/solitaer/AblageStackTest.java diff --git a/src/main/java/solitaer/AblageStack.java b/src/main/java/solitaer/AblageStack.java new file mode 100644 index 0000000..7cb9fbe --- /dev/null +++ b/src/main/java/solitaer/AblageStack.java @@ -0,0 +1,21 @@ +package solitaer; + +public class AblageStack extends BaseStack { + + private static final long serialVersionUID = 1L; + + public AblageStack(int _x, int _y) { + super(); + super.setLocation(_x, _y); + super.setSize(IMAGE_WIDTH, STACK_HIGHT); + super.setOpaque(false); + super.setLayout(null); + } + + @Override + protected boolean cardCheck(Card _topStack, Card _playerCard) { + // TODO Auto-generated method stub + return true; + } + +} diff --git a/src/test/java/solitaer/AblageStackTest.java b/src/test/java/solitaer/AblageStackTest.java new file mode 100644 index 0000000..4a9283e --- /dev/null +++ b/src/test/java/solitaer/AblageStackTest.java @@ -0,0 +1,28 @@ +package solitaer; + +import static org.junit.jupiter.api.Assertions.*; + +import java.util.stream.Stream; + +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.Arguments; +import org.junit.jupiter.params.provider.MethodSource; + +class AblageStackTest { + + @ParameterizedTest + @MethodSource("testAblageStackTestDaten") + void testRulesetStartStack(String msg, Card _stapel, Card _spieler, boolean _expectedResult) { + AblageStack stack = new AblageStack(0, 0); + assertEquals(_expectedResult, stack.cardCheck(_stapel, _spieler), msg); + } + + private static Stream testAblageStackTestDaten(){ + return Stream.of( + Arguments.of("Ass-Kreuz auf Leeres Feld", + null, + new Card(1, Symbol.Kreuz, true), true) + ); + } + +} From e5fa1c365767fbf9c402e165170aba1d5d564831 Mon Sep 17 00:00:00 2001 From: Alexander Hartung Date: Sun, 30 Jan 2022 16:10:00 +0100 Subject: [PATCH 19/54] Add Ruleset for AblageStack and Tests --- src/main/java/solitaer/AblageStack.java | 19 ++++++++++++--- src/test/java/solitaer/AblageStackTest.java | 26 +++++++++++++++++---- 2 files changed, 38 insertions(+), 7 deletions(-) diff --git a/src/main/java/solitaer/AblageStack.java b/src/main/java/solitaer/AblageStack.java index 7cb9fbe..0e436b6 100644 --- a/src/main/java/solitaer/AblageStack.java +++ b/src/main/java/solitaer/AblageStack.java @@ -3,19 +3,32 @@ package solitaer; public class AblageStack extends BaseStack { private static final long serialVersionUID = 1L; + private Symbol sym; - public AblageStack(int _x, int _y) { + public AblageStack(int _x, int _y, Symbol _sym) { super(); super.setLocation(_x, _y); super.setSize(IMAGE_WIDTH, STACK_HIGHT); super.setOpaque(false); super.setLayout(null); + + this.sym = _sym; } @Override protected boolean cardCheck(Card _topStack, Card _playerCard) { - // TODO Auto-generated method stub - return true; + if(_topStack == null && _playerCard == null) { + return false; + } + if(_playerCard.getSymbol() != this.sym) { + return false; + } else if(_topStack == null) { + //nur ein Ass darf auf einen Leeren Stabel gelegt werden + return _playerCard.getNr() == 1; + } else { + return _topStack.getNr() == _playerCard.getNr() - 1; + } + } } diff --git a/src/test/java/solitaer/AblageStackTest.java b/src/test/java/solitaer/AblageStackTest.java index 4a9283e..6059ac1 100644 --- a/src/test/java/solitaer/AblageStackTest.java +++ b/src/test/java/solitaer/AblageStackTest.java @@ -12,16 +12,34 @@ class AblageStackTest { @ParameterizedTest @MethodSource("testAblageStackTestDaten") - void testRulesetStartStack(String msg, Card _stapel, Card _spieler, boolean _expectedResult) { - AblageStack stack = new AblageStack(0, 0); + void testRulesetAblageStack(String msg, Card _stapel, Card _spieler, boolean _expectedResult) { + AblageStack stack = new AblageStack(0, 0, Symbol.Kreuz); assertEquals(_expectedResult, stack.cardCheck(_stapel, _spieler), msg); } private static Stream testAblageStackTestDaten(){ return Stream.of( - Arguments.of("Ass-Kreuz auf Leeres Feld", + Arguments.of("Ass-Kreuz auf Leeres Kreuz-Feld", null, - new Card(1, Symbol.Kreuz, true), true) + null, false), + Arguments.of("Ass-Kreuz auf Leeres Kreuz-Feld", + null, + new Card(1, Symbol.Kreuz, true), true), + Arguments.of("02-Kreuz auf Leeres Kreuz-Feld", + null, + new Card(2, Symbol.Kreuz, true), false), + Arguments.of("Ass-Herz auf Leeres Kreuz-Feld", + null, + new Card(1, Symbol.Herz, true), false), + Arguments.of("05-Kreuz auf 04-Kreuz", + new Card(4, Symbol.Kreuz, true), + new Card(5, Symbol.Kreuz, true), true), + Arguments.of("05-Herz auf 04-Kreuz", + new Card(4, Symbol.Kreuz, true), + new Card(5, Symbol.Herz, true), false), + Arguments.of("Ass-Kreuz auf König-Kreuz", + new Card(13, Symbol.Kreuz, true), + new Card(1, Symbol.Kreuz, true), false) ); } From b16c5e74ad3f4673d76c414c9bddd6ac3e2d9d03 Mon Sep 17 00:00:00 2001 From: Alexander Hartung Date: Sun, 30 Jan 2022 16:23:55 +0100 Subject: [PATCH 20/54] Add render for AblageStack --- src/main/java/solitaer/AblageStack.java | 29 +++++++++++++++++++ src/main/java/solitaer/SolitaerGamePanel.java | 15 ++++++++-- 2 files changed, 41 insertions(+), 3 deletions(-) diff --git a/src/main/java/solitaer/AblageStack.java b/src/main/java/solitaer/AblageStack.java index 0e436b6..56439a0 100644 --- a/src/main/java/solitaer/AblageStack.java +++ b/src/main/java/solitaer/AblageStack.java @@ -1,5 +1,9 @@ package solitaer; +import java.awt.Color; +import java.awt.Font; +import java.awt.Graphics; + public class AblageStack extends BaseStack { private static final long serialVersionUID = 1L; @@ -30,5 +34,30 @@ public class AblageStack extends BaseStack { } } + + @Override + protected void paintComponent(Graphics g) { + // TODO Auto-generated method stub + super.paintComponent(g); + if (stackIsEmpty()) { + g.setColor(Color.gray); + g.fillRect(0, 0, this.getWidth(), IMAGE_HIGHT); + + g.setColor(Color.black); + g.drawRect(0, 0, this.getWidth()-1, IMAGE_HIGHT-1); + + if (this.sym == Symbol.Herz || this.sym == Symbol.Karo) + g.setColor(Color.red); + else + g.setColor(Color.black); + + int fontSize = 20; + Font f = new Font(Font.MONOSPACED, Font.BOLD, fontSize); + g.setFont(f); + + String text = this.sym.toString(); + g.drawString(text, 5, this.IMAGE_HIGHT/2); + } + } } diff --git a/src/main/java/solitaer/SolitaerGamePanel.java b/src/main/java/solitaer/SolitaerGamePanel.java index d94b99c..a7a56f5 100644 --- a/src/main/java/solitaer/SolitaerGamePanel.java +++ b/src/main/java/solitaer/SolitaerGamePanel.java @@ -25,7 +25,7 @@ public class SolitaerGamePanel extends JPanel { - StartStack a = new StartStack(25,25); + StartStack a = new StartStack(25,125); a.addCard(deck.getDeck().get(0)); @@ -46,13 +46,13 @@ public class SolitaerGamePanel extends JPanel { this.add(a); - StartStack b = new StartStack(200,25); + StartStack b = new StartStack(200,125); deck.getDeck().get(32).setFaceUp(true); b.addCard((deck.getDeck().get(32))); this.add(b); - StartStack c = new StartStack(375,25); + StartStack c = new StartStack(375,125); deck.getDeck().get(33).setFaceUp(true); c.addCard((deck.getDeck().get(33))); @@ -62,6 +62,15 @@ public class SolitaerGamePanel extends JPanel { this.add(save); + AblageStack a1 = new AblageStack(200, 10, Symbol.Herz); + this.add(a1); + AblageStack a2 = new AblageStack(275, 10, Symbol.Kreuz); + this.add(a2); + AblageStack a3 = new AblageStack(350, 10, Symbol.Karo); + this.add(a3); + AblageStack a4 = new AblageStack(425, 10, Symbol.Pik); + this.add(a4); + } From 2cb74cadc9308531abbb85625560bd83c4f10da9 Mon Sep 17 00:00:00 2001 From: Alexander Hartung Date: Sun, 30 Jan 2022 16:48:51 +0100 Subject: [PATCH 21/54] add MouseInput for AblageStack --- src/main/java/solitaer/MyMouseListener.java | 51 ++++++++++++++++--- src/main/java/solitaer/SolitaerGamePanel.java | 15 ++++-- 2 files changed, 53 insertions(+), 13 deletions(-) diff --git a/src/main/java/solitaer/MyMouseListener.java b/src/main/java/solitaer/MyMouseListener.java index 4e9a08a..c79d440 100644 --- a/src/main/java/solitaer/MyMouseListener.java +++ b/src/main/java/solitaer/MyMouseListener.java @@ -58,26 +58,61 @@ public class MyMouseListener implements MouseInputListener { selectedStack = tempStack; } - } - //saveStack is NOT empty + } + // saveStack is NOT empty else { - if(selectedStack == null) { + if (selectedStack == null) { System.out.println("ERROR selectedStack in StartStack"); } - if(tempStack.cardCheck(tempStack.peekLastCard(), saveStack.peekLastCard())) { - while(!saveStack.stackIsEmpty()) { + if (tempStack.cardCheck(tempStack.peekLastCard(), saveStack.peekLastCard())) { + while (!saveStack.stackIsEmpty()) { tempStack.addCard(saveStack.removeLastCard()); } } else { - //Alles wieder auf den Ursprünglichen Stack packen - while(!saveStack.stackIsEmpty()) { + // Alles wieder auf den Ursprünglichen Stack packen + while (!saveStack.stackIsEmpty()) { selectedStack.addCard(saveStack.removeLastCard()); } } - + selectedStack = null; } } + // AblageStack + else if (com.getParent() instanceof AblageStack || com instanceof AblageStack) { + + System.out.println("AblageStack"); + + if (com instanceof AblageStack) { + tempStack = (AblageStack) com; + } else { + tempStack = (AblageStack) com.getParent(); + + } + + if (saveStack.stackIsEmpty()) { + // Move Top Card from AblageStack in Save + if (tempStack.stackIsEmpty() == false) { + saveStack.addCard(tempStack.removeLastCard()); + selectedStack = tempStack; + } + + } else { + // Move Card from Save in AblageStack + if (saveStack.stackSize() == 1) { + if (tempStack.cardCheck(tempStack.peekLastCard(), saveStack.peekLastCard())) { + tempStack.addCard(saveStack.removeLastCard()); + } + + } else { + // Alles wieder auf den Ursprünglichen Stack packen + while (!saveStack.stackIsEmpty()) { + selectedStack.addCard(saveStack.removeLastCard()); + } + } + } + + } } diff --git a/src/main/java/solitaer/SolitaerGamePanel.java b/src/main/java/solitaer/SolitaerGamePanel.java index a7a56f5..4c16f06 100644 --- a/src/main/java/solitaer/SolitaerGamePanel.java +++ b/src/main/java/solitaer/SolitaerGamePanel.java @@ -26,9 +26,7 @@ public class SolitaerGamePanel extends JPanel { StartStack a = new StartStack(25,125); - - a.addCard(deck.getDeck().get(0)); - + deck.getDeck().get(5).setFaceUp(true); a.addCard((deck.getDeck().get(5))); @@ -44,6 +42,9 @@ public class SolitaerGamePanel extends JPanel { deck.getDeck().get(1).setFaceUp(true); a.addCard((deck.getDeck().get(1))); + deck.getDeck().get(0).setFaceUp(true); + a.addCard(deck.getDeck().get(0)); + this.add(a); StartStack b = new StartStack(200,125); @@ -54,10 +55,14 @@ public class SolitaerGamePanel extends JPanel { StartStack c = new StartStack(375,125); - deck.getDeck().get(33).setFaceUp(true); - c.addCard((deck.getDeck().get(33))); + deck.getDeck().get(13).setFaceUp(true); + c.addCard((deck.getDeck().get(12))); this.add(c); + + StartStack d = new StartStack(475,125); + this.add(d); + //save = new SaveStack(500,250); this.add(save); From 63cdf0a8a799eea750de2171e536ea8379a756cd Mon Sep 17 00:00:00 2001 From: Alexander Hartung Date: Sun, 30 Jan 2022 16:53:19 +0100 Subject: [PATCH 22/54] remove offset for AblageStack --- src/main/java/solitaer/AblageStack.java | 2 +- src/main/java/solitaer/BaseStack.java | 12 +++++++++--- src/main/java/solitaer/SaveStack.java | 2 +- src/main/java/solitaer/StartStack.java | 2 +- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/main/java/solitaer/AblageStack.java b/src/main/java/solitaer/AblageStack.java index 56439a0..c96818b 100644 --- a/src/main/java/solitaer/AblageStack.java +++ b/src/main/java/solitaer/AblageStack.java @@ -10,7 +10,7 @@ public class AblageStack extends BaseStack { private Symbol sym; public AblageStack(int _x, int _y, Symbol _sym) { - super(); + super(false); super.setLocation(_x, _y); super.setSize(IMAGE_WIDTH, STACK_HIGHT); super.setOpaque(false); diff --git a/src/main/java/solitaer/BaseStack.java b/src/main/java/solitaer/BaseStack.java index 84dfab2..a94321d 100644 --- a/src/main/java/solitaer/BaseStack.java +++ b/src/main/java/solitaer/BaseStack.java @@ -13,9 +13,15 @@ public abstract class BaseStack extends JPanel { private ArrayList stack = new ArrayList(); private final int OFFSET_VALUE = 20; int offset; + int addOffset; - public BaseStack() { + public BaseStack(boolean _offset) { // TODO Auto-generated constructor stub + if(_offset) { + addOffset = OFFSET_VALUE; + }else { + addOffset = 0; + } offset = 0; } @@ -43,13 +49,13 @@ public abstract class BaseStack extends JPanel { _card.setLocation(0, offset); stack.add(_card); RenderStackNew(); - offset += OFFSET_VALUE; + offset += addOffset; } public Card removeLastCard() { if (stack.size() != 0) { Card LastCard = stack.remove(stack.size() - 1); - offset -= OFFSET_VALUE; + offset -= addOffset; RenderStackNew(); return LastCard; } diff --git a/src/main/java/solitaer/SaveStack.java b/src/main/java/solitaer/SaveStack.java index 3f423a2..cd4cea0 100644 --- a/src/main/java/solitaer/SaveStack.java +++ b/src/main/java/solitaer/SaveStack.java @@ -9,7 +9,7 @@ public class SaveStack extends BaseStack { public SaveStack(int _x, int _y) { // TODO Auto-generated constructor stub - super(); + super(true); super.setLocation(_x, _y); super.setSize(IMAGE_WIDTH, STACK_HIGHT); super.setOpaque(false); diff --git a/src/main/java/solitaer/StartStack.java b/src/main/java/solitaer/StartStack.java index 8f14ae6..068b88f 100644 --- a/src/main/java/solitaer/StartStack.java +++ b/src/main/java/solitaer/StartStack.java @@ -9,7 +9,7 @@ public class StartStack extends BaseStack { private static final long serialVersionUID = 1L; public StartStack(int _x, int _y) { - super(); + super(true); super.setLocation(_x, _y); super.setSize(IMAGE_WIDTH, STACK_HIGHT); super.setOpaque(false); From 24f874a09d420b4b441b2c610319a6420a35b6bc Mon Sep 17 00:00:00 2001 From: Alexander Hartung Date: Sun, 30 Jan 2022 17:09:23 +0100 Subject: [PATCH 23/54] Refactor MouseInput --- src/main/java/solitaer/MyMouseListener.java | 23 ++++++++++----------- 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/src/main/java/solitaer/MyMouseListener.java b/src/main/java/solitaer/MyMouseListener.java index c79d440..ee54111 100644 --- a/src/main/java/solitaer/MyMouseListener.java +++ b/src/main/java/solitaer/MyMouseListener.java @@ -65,14 +65,9 @@ public class MyMouseListener implements MouseInputListener { System.out.println("ERROR selectedStack in StartStack"); } if (tempStack.cardCheck(tempStack.peekLastCard(), saveStack.peekLastCard())) { - while (!saveStack.stackIsEmpty()) { - tempStack.addCard(saveStack.removeLastCard()); - } + clearSaveStack(tempStack); } else { - // Alles wieder auf den Ursprünglichen Stack packen - while (!saveStack.stackIsEmpty()) { - selectedStack.addCard(saveStack.removeLastCard()); - } + clearSaveStack(selectedStack); } selectedStack = null; @@ -87,7 +82,6 @@ public class MyMouseListener implements MouseInputListener { tempStack = (AblageStack) com; } else { tempStack = (AblageStack) com.getParent(); - } if (saveStack.stackIsEmpty()) { @@ -105,10 +99,8 @@ public class MyMouseListener implements MouseInputListener { } } else { - // Alles wieder auf den Ursprünglichen Stack packen - while (!saveStack.stackIsEmpty()) { - selectedStack.addCard(saveStack.removeLastCard()); - } + //Clear Save + clearSaveStack(selectedStack); } } @@ -116,6 +108,13 @@ public class MyMouseListener implements MouseInputListener { } + private void clearSaveStack(BaseStack _ziel) { + // Alles wieder auf den Ursprünglichen Stack packen + while (!saveStack.stackIsEmpty()) { + _ziel.addCard(saveStack.removeLastCard()); + } + } + @Override public void mouseReleased(MouseEvent e) { // TODO Auto-generated method stub From 29b2c1db6776a33abc30d581ba495423f01b2bf3 Mon Sep 17 00:00:00 2001 From: Alexander Hartung Date: Sun, 30 Jan 2022 17:50:24 +0100 Subject: [PATCH 24/54] Add GeberStack --- src/main/java/solitaer/GeberStack.java | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/main/java/solitaer/GeberStack.java diff --git a/src/main/java/solitaer/GeberStack.java b/src/main/java/solitaer/GeberStack.java new file mode 100644 index 0000000..2696e62 --- /dev/null +++ b/src/main/java/solitaer/GeberStack.java @@ -0,0 +1,21 @@ +package solitaer; + +public class GeberStack extends BaseStack { + + private static final long serialVersionUID = 1L; + + public GeberStack(int _x, int _y) { + super(false); + super.setLocation(_x, _y); + super.setSize(IMAGE_WIDTH, STACK_HIGHT); + super.setOpaque(false); + super.setLayout(null); + } + + @Override + protected boolean cardCheck(Card _topStack, Card _playerCard) { + // TODO Auto-generated method stub + return false; + } + +} From e5832eac493f85582d3ae3e722b4690c248a4b32 Mon Sep 17 00:00:00 2001 From: Alexander Hartung Date: Sun, 30 Jan 2022 17:53:39 +0100 Subject: [PATCH 25/54] Add WasteStack --- src/main/java/solitaer/GeberStack.java | 6 +++++- src/main/java/solitaer/WasteStack.java | 21 +++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 src/main/java/solitaer/WasteStack.java diff --git a/src/main/java/solitaer/GeberStack.java b/src/main/java/solitaer/GeberStack.java index 2696e62..b3c6e58 100644 --- a/src/main/java/solitaer/GeberStack.java +++ b/src/main/java/solitaer/GeberStack.java @@ -3,13 +3,17 @@ package solitaer; public class GeberStack extends BaseStack { private static final long serialVersionUID = 1L; + + private WasteStack wasteStack; - public GeberStack(int _x, int _y) { + public GeberStack(int _x, int _y, WasteStack _waste) { super(false); super.setLocation(_x, _y); super.setSize(IMAGE_WIDTH, STACK_HIGHT); super.setOpaque(false); super.setLayout(null); + + this.wasteStack = _waste; } @Override diff --git a/src/main/java/solitaer/WasteStack.java b/src/main/java/solitaer/WasteStack.java new file mode 100644 index 0000000..554a936 --- /dev/null +++ b/src/main/java/solitaer/WasteStack.java @@ -0,0 +1,21 @@ +package solitaer; + +public class WasteStack extends BaseStack { + + private static final long serialVersionUID = 1L; + + public WasteStack(int _x, int _y) { + super(false); + super.setLocation(_x, _y); + super.setSize(IMAGE_WIDTH, STACK_HIGHT); + super.setOpaque(false); + super.setLayout(null); + } + + @Override + protected boolean cardCheck(Card _topStack, Card _playerCard) { + // TODO Auto-generated method stub + return false; + } + +} From f95187e009424b4fecb31f55a43cc6a72f17d988 Mon Sep 17 00:00:00 2001 From: Alexander Hartung Date: Sun, 30 Jan 2022 17:58:22 +0100 Subject: [PATCH 26/54] Add render for GeberStack --- src/main/java/solitaer/GeberStack.java | 19 +++++++++++++++++++ src/main/java/solitaer/SolitaerGamePanel.java | 7 +++++++ 2 files changed, 26 insertions(+) diff --git a/src/main/java/solitaer/GeberStack.java b/src/main/java/solitaer/GeberStack.java index b3c6e58..9e10e10 100644 --- a/src/main/java/solitaer/GeberStack.java +++ b/src/main/java/solitaer/GeberStack.java @@ -1,5 +1,8 @@ package solitaer; +import java.awt.Color; +import java.awt.Graphics; + public class GeberStack extends BaseStack { private static final long serialVersionUID = 1L; @@ -21,5 +24,21 @@ public class GeberStack extends BaseStack { // TODO Auto-generated method stub return false; } + + @Override + protected void paintComponent(Graphics g) { + // TODO Auto-generated method stub + super.paintComponent(g); + if (stackIsEmpty()) { + g.setColor(Color.pink); + g.fillRect(0, 0, this.getWidth(), IMAGE_HIGHT); + + g.setColor(Color.black); + g.drawRect(0, 0, this.getWidth() - 1, IMAGE_HIGHT - 1); + + String text = "Start\nAgain"; + g.drawString(text, 5, this.IMAGE_HIGHT/2); + } + } } diff --git a/src/main/java/solitaer/SolitaerGamePanel.java b/src/main/java/solitaer/SolitaerGamePanel.java index 4c16f06..834e22a 100644 --- a/src/main/java/solitaer/SolitaerGamePanel.java +++ b/src/main/java/solitaer/SolitaerGamePanel.java @@ -77,6 +77,13 @@ public class SolitaerGamePanel extends JPanel { this.add(a4); + WasteStack w = new WasteStack(85, 10); + GeberStack g = new GeberStack(10, 10, w); + + this.add(w); + this.add(g); + + } From 698569ba076d98eeadb6894a593b444f6064db59 Mon Sep 17 00:00:00 2001 From: Alexander Hartung Date: Sun, 30 Jan 2022 18:00:49 +0100 Subject: [PATCH 27/54] Add render for WasteStack --- src/main/java/solitaer/WasteStack.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/main/java/solitaer/WasteStack.java b/src/main/java/solitaer/WasteStack.java index 554a936..c86d360 100644 --- a/src/main/java/solitaer/WasteStack.java +++ b/src/main/java/solitaer/WasteStack.java @@ -1,5 +1,8 @@ package solitaer; +import java.awt.Color; +import java.awt.Graphics; + public class WasteStack extends BaseStack { private static final long serialVersionUID = 1L; @@ -17,5 +20,19 @@ public class WasteStack extends BaseStack { // TODO Auto-generated method stub return false; } + + @Override + protected void paintComponent(Graphics g) { + // TODO Auto-generated method stub + super.paintComponent(g); + if (stackIsEmpty()) { + g.setColor(Color.lightGray); + g.fillRect(0, 0, this.getWidth(), IMAGE_HIGHT); + + g.setColor(Color.black); + g.drawRect(0, 0, this.getWidth() - 1, IMAGE_HIGHT - 1); + + } + } } From f83db6a3f957e407e93ccc34bc4fb41b01645b48 Mon Sep 17 00:00:00 2001 From: Alexander Hartung Date: Sun, 30 Jan 2022 18:38:24 +0100 Subject: [PATCH 28/54] Add swapGeberWaste Funktion and Add Test --- src/main/java/solitaer/GeberStack.java | 11 ++++++++++ src/test/java/solitaer/GeberStackTest.java | 25 ++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 src/test/java/solitaer/GeberStackTest.java diff --git a/src/main/java/solitaer/GeberStack.java b/src/main/java/solitaer/GeberStack.java index 9e10e10..1136daa 100644 --- a/src/main/java/solitaer/GeberStack.java +++ b/src/main/java/solitaer/GeberStack.java @@ -19,6 +19,17 @@ public class GeberStack extends BaseStack { this.wasteStack = _waste; } + public WasteStack getWastStack() { + return wasteStack; + } + + public void swapWasteGeber() { + while(wasteStack.stackIsEmpty() == false) { + this.addCard(wasteStack.removeLastCard()); + } + } + + @Override protected boolean cardCheck(Card _topStack, Card _playerCard) { // TODO Auto-generated method stub diff --git a/src/test/java/solitaer/GeberStackTest.java b/src/test/java/solitaer/GeberStackTest.java new file mode 100644 index 0000000..0115389 --- /dev/null +++ b/src/test/java/solitaer/GeberStackTest.java @@ -0,0 +1,25 @@ +package solitaer; + +import static org.junit.jupiter.api.Assertions.*; + +import org.junit.jupiter.api.Test; + +class GeberStackTest { + + @Test + void testswapGeberWaste001() { + WasteStack waste = new WasteStack(0, 0); + GeberStack geber = new GeberStack(0, 0, waste); + + for (int i = 1; i < 14; i++) { + waste.addCard(new Card(0, Symbol.Pik, false)); + } + + int expectedResult = waste.stackSize(); + + geber.swapWasteGeber(); + + assertEquals(geber.stackSize(), expectedResult, "same Size"); + } + +} From ae20cbcbaefab7e9470b1d9946a3cb159c574add Mon Sep 17 00:00:00 2001 From: Alexander Hartung Date: Sun, 30 Jan 2022 21:20:56 +0100 Subject: [PATCH 29/54] Add MousInput GeberStack --- src/main/java/solitaer/GeberStack.java | 4 ++- src/main/java/solitaer/MyMouseListener.java | 25 ++++++++++++++++++- src/main/java/solitaer/SolitaerGamePanel.java | 13 ++++++++++ 3 files changed, 40 insertions(+), 2 deletions(-) diff --git a/src/main/java/solitaer/GeberStack.java b/src/main/java/solitaer/GeberStack.java index 1136daa..a974883 100644 --- a/src/main/java/solitaer/GeberStack.java +++ b/src/main/java/solitaer/GeberStack.java @@ -25,7 +25,9 @@ public class GeberStack extends BaseStack { public void swapWasteGeber() { while(wasteStack.stackIsEmpty() == false) { - this.addCard(wasteStack.removeLastCard()); + Card card = wasteStack.removeLastCard(); + card.setFaceUp(false); + this.addCard(card); } } diff --git a/src/main/java/solitaer/MyMouseListener.java b/src/main/java/solitaer/MyMouseListener.java index ee54111..2e227a2 100644 --- a/src/main/java/solitaer/MyMouseListener.java +++ b/src/main/java/solitaer/MyMouseListener.java @@ -105,9 +105,32 @@ public class MyMouseListener implements MouseInputListener { } } + // GeberStack + else if (com.getParent() instanceof GeberStack || com instanceof GeberStack) { - } + System.out.println("GeberStack"); + + if (com instanceof GeberStack) { + tempStack = (GeberStack) com; + } else { + tempStack = (GeberStack) com.getParent(); + } + + if (tempStack.stackIsEmpty()) { + // Move all from Waste to Geber + ((GeberStack) this.tempStack).swapWasteGeber(); + } else { + // Move next card to Waste + tempCard = tempStack.removeLastCard(); + tempCard.setFaceUp(true); + ((GeberStack) this.tempStack).getWastStack() + .addCard(tempCard); + + } + } + + } private void clearSaveStack(BaseStack _ziel) { // Alles wieder auf den Ursprünglichen Stack packen while (!saveStack.stackIsEmpty()) { diff --git a/src/main/java/solitaer/SolitaerGamePanel.java b/src/main/java/solitaer/SolitaerGamePanel.java index 834e22a..837bf33 100644 --- a/src/main/java/solitaer/SolitaerGamePanel.java +++ b/src/main/java/solitaer/SolitaerGamePanel.java @@ -80,6 +80,19 @@ public class SolitaerGamePanel extends JPanel { WasteStack w = new WasteStack(85, 10); GeberStack g = new GeberStack(10, 10, w); + deck.getDeck().get(34).setFaceUp(true); + w.addCard(deck.getDeck().get(34)); + deck.getDeck().get(35).setFaceUp(true); + w.addCard(deck.getDeck().get(35)); + deck.getDeck().get(36).setFaceUp(true); + w.addCard(deck.getDeck().get(36)); + deck.getDeck().get(37).setFaceUp(true); + w.addCard(deck.getDeck().get(37)); + + + g.addCard(deck.getDeck().get(38)); + + this.add(w); this.add(g); From b2be476c381ec84dd50bf186bfb6d68005fc83ea Mon Sep 17 00:00:00 2001 From: Alexander Hartung Date: Sun, 30 Jan 2022 21:28:35 +0100 Subject: [PATCH 30/54] Refactor GeberStack --- src/main/java/solitaer/GeberStack.java | 15 ++++++++++++--- src/main/java/solitaer/MyMouseListener.java | 14 +++----------- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/src/main/java/solitaer/GeberStack.java b/src/main/java/solitaer/GeberStack.java index a974883..41aa66a 100644 --- a/src/main/java/solitaer/GeberStack.java +++ b/src/main/java/solitaer/GeberStack.java @@ -25,12 +25,21 @@ public class GeberStack extends BaseStack { public void swapWasteGeber() { while(wasteStack.stackIsEmpty() == false) { - Card card = wasteStack.removeLastCard(); - card.setFaceUp(false); - this.addCard(card); + moveCardTurnFace(wasteStack, this, false); } } + public void moveToWaste() { + moveCardTurnFace(this, wasteStack, true); + } + + private void moveCardTurnFace(BaseStack _removeStack, BaseStack _addStack, boolean _face) { + Card card = _removeStack.removeLastCard(); + card.setFaceUp(_face); + _addStack.addCard(card); + + } + @Override protected boolean cardCheck(Card _topStack, Card _playerCard) { diff --git a/src/main/java/solitaer/MyMouseListener.java b/src/main/java/solitaer/MyMouseListener.java index 2e227a2..695a440 100644 --- a/src/main/java/solitaer/MyMouseListener.java +++ b/src/main/java/solitaer/MyMouseListener.java @@ -106,30 +106,22 @@ public class MyMouseListener implements MouseInputListener { } // GeberStack - else if (com.getParent() instanceof GeberStack || com instanceof GeberStack) { - + else if (com.getParent() instanceof GeberStack + || com instanceof GeberStack) { System.out.println("GeberStack"); - if (com instanceof GeberStack) { tempStack = (GeberStack) com; } else { tempStack = (GeberStack) com.getParent(); } - if (tempStack.stackIsEmpty()) { // Move all from Waste to Geber ((GeberStack) this.tempStack).swapWasteGeber(); } else { // Move next card to Waste - tempCard = tempStack.removeLastCard(); - tempCard.setFaceUp(true); - ((GeberStack) this.tempStack).getWastStack() - .addCard(tempCard); - + ((GeberStack) this.tempStack).moveToWaste(); } - } - } private void clearSaveStack(BaseStack _ziel) { // Alles wieder auf den Ursprünglichen Stack packen From 8b93f0414429295fcd4fc0e20a3eb6e1f0cab381 Mon Sep 17 00:00:00 2001 From: Alexander Hartung Date: Sun, 30 Jan 2022 21:56:46 +0100 Subject: [PATCH 31/54] Add MouseInput WasteStack --- src/main/java/solitaer/MyMouseListener.java | 26 ++++++++++++++++--- src/main/java/solitaer/SolitaerGamePanel.java | 4 +-- 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/src/main/java/solitaer/MyMouseListener.java b/src/main/java/solitaer/MyMouseListener.java index 695a440..4067231 100644 --- a/src/main/java/solitaer/MyMouseListener.java +++ b/src/main/java/solitaer/MyMouseListener.java @@ -99,15 +99,14 @@ public class MyMouseListener implements MouseInputListener { } } else { - //Clear Save + // Clear Save clearSaveStack(selectedStack); } } } // GeberStack - else if (com.getParent() instanceof GeberStack - || com instanceof GeberStack) { + else if (com.getParent() instanceof GeberStack || com instanceof GeberStack) { System.out.println("GeberStack"); if (com instanceof GeberStack) { tempStack = (GeberStack) com; @@ -122,7 +121,28 @@ public class MyMouseListener implements MouseInputListener { ((GeberStack) this.tempStack).moveToWaste(); } } + // WasteStack + else if (com.getParent() instanceof WasteStack || com instanceof WasteStack) { + System.out.println("WasteStack"); + if (com instanceof WasteStack) { + tempStack = (WasteStack) com; + } else { + tempStack = (WasteStack) com.getParent(); + } + + if (saveStack.stackIsEmpty()) { + // Move Top Card from AblageStack in Save + if (tempStack.stackIsEmpty() == false) { + saveStack.addCard(tempStack.removeLastCard()); + selectedStack = tempStack; + } + + } else { + clearSaveStack(selectedStack); + } + } } + private void clearSaveStack(BaseStack _ziel) { // Alles wieder auf den Ursprünglichen Stack packen while (!saveStack.stackIsEmpty()) { diff --git a/src/main/java/solitaer/SolitaerGamePanel.java b/src/main/java/solitaer/SolitaerGamePanel.java index 837bf33..f3f757d 100644 --- a/src/main/java/solitaer/SolitaerGamePanel.java +++ b/src/main/java/solitaer/SolitaerGamePanel.java @@ -55,8 +55,8 @@ public class SolitaerGamePanel extends JPanel { StartStack c = new StartStack(375,125); - deck.getDeck().get(13).setFaceUp(true); - c.addCard((deck.getDeck().get(12))); + deck.getDeck().get(10).setFaceUp(true); + c.addCard((deck.getDeck().get(10))); this.add(c); From 5f6b3bbfffe27232e42c450887e493bbe355087c Mon Sep 17 00:00:00 2001 From: Alexander Hartung Date: Sun, 30 Jan 2022 22:26:22 +0100 Subject: [PATCH 32/54] Fix MouseInput StartStack --- src/main/java/solitaer/MyMouseListener.java | 58 +++++++++++-------- src/main/java/solitaer/SolitaerGamePanel.java | 4 +- 2 files changed, 37 insertions(+), 25 deletions(-) diff --git a/src/main/java/solitaer/MyMouseListener.java b/src/main/java/solitaer/MyMouseListener.java index 4067231..70aec81 100644 --- a/src/main/java/solitaer/MyMouseListener.java +++ b/src/main/java/solitaer/MyMouseListener.java @@ -30,37 +30,49 @@ public class MyMouseListener implements MouseInputListener { System.out.println("DOWN"); Component com = SwingUtilities.getDeepestComponentAt(e.getComponent(), e.getX(), e.getY()); - // Leeres StartFeld - if (com instanceof StartStack) { - System.out.println("Leer Start"); - - } - // Karte, die in einem StartStack liegt - else if (com instanceof Card && com.getParent() instanceof StartStack) { - tempCard = (Card) com; - tempStack = (StartStack) com.getParent(); +// // Leeres StartFeld +// if (com instanceof StartStack) { +// System.out.println("Leer Start"); +// +// } +// // Karte, die in einem StartStack liegt +// else + if ((com instanceof Card && com.getParent() instanceof StartStack) + || (com instanceof StartStack && ((StartStack) com).stackIsEmpty())) { if (saveStack.stackIsEmpty()) { - // Wenn faceDown, schau ob es die oberste Carde ist und dreh diese um - if (!tempCard.isFaceUp()) { - if (tempStack.peekLastCard().equals(tempCard)) { - tempCard.setFaceUp(true); - tempCard.repaint(); - } - } - // Card faceUp - else { - // move all Cards below the selected Card to Save - int index = tempStack.indexOfCard(tempCard); - while (tempStack.stackSize() - 1 >= index) { - saveStack.addCard(tempStack.removeLastCard()); + + if (com instanceof Card && com.getParent() instanceof StartStack) { + tempCard = (Card) com; + tempStack = (StartStack) com.getParent(); + + // Wenn faceDown, schau ob es die oberste Carde ist und dreh diese um + if (!tempCard.isFaceUp()) { + if (tempStack.peekLastCard().equals(tempCard)) { + tempCard.setFaceUp(true); + tempCard.repaint(); + } } - selectedStack = tempStack; + // Card faceUp + else { + // move all Cards below the selected Card to Save + int index = tempStack.indexOfCard(tempCard); + while (tempStack.stackSize() - 1 >= index) { + saveStack.addCard(tempStack.removeLastCard()); + } + selectedStack = tempStack; + } } } // saveStack is NOT empty else { + if(com instanceof StartStack) { + tempStack = (StartStack) com; + } else { + tempStack = (StartStack) com.getParent(); + } + if (selectedStack == null) { System.out.println("ERROR selectedStack in StartStack"); } diff --git a/src/main/java/solitaer/SolitaerGamePanel.java b/src/main/java/solitaer/SolitaerGamePanel.java index f3f757d..7eaf634 100644 --- a/src/main/java/solitaer/SolitaerGamePanel.java +++ b/src/main/java/solitaer/SolitaerGamePanel.java @@ -55,8 +55,8 @@ public class SolitaerGamePanel extends JPanel { StartStack c = new StartStack(375,125); - deck.getDeck().get(10).setFaceUp(true); - c.addCard((deck.getDeck().get(10))); + //deck.getDeck().get(20).setFaceUp(true); + c.addCard((deck.getDeck().get(20))); this.add(c); From d89b2a0c02bfbc0b999b84158c4e419b2980d944 Mon Sep 17 00:00:00 2001 From: Alexander Hartung Date: Sun, 30 Jan 2022 22:35:24 +0100 Subject: [PATCH 33/54] Update check and test from StartStack --- src/main/java/solitaer/StartStack.java | 36 +++++++++------------- src/test/java/solitaer/StartStackTest.java | 5 +-- 2 files changed, 18 insertions(+), 23 deletions(-) diff --git a/src/main/java/solitaer/StartStack.java b/src/main/java/solitaer/StartStack.java index 068b88f..0dd2f8f 100644 --- a/src/main/java/solitaer/StartStack.java +++ b/src/main/java/solitaer/StartStack.java @@ -3,11 +3,10 @@ package solitaer; import java.awt.Color; import java.awt.Graphics; - public class StartStack extends BaseStack { private static final long serialVersionUID = 1L; - + public StartStack(int _x, int _y) { super(true); super.setLocation(_x, _y); @@ -17,30 +16,27 @@ public class StartStack extends BaseStack { } public boolean cardCheck(Card _topStack, Card _playerCard) { - if(_topStack == null && _playerCard == null) { + if (_topStack == null && _playerCard == null) { return false; - } + } if (_topStack == null) { // Nur der König kann auf einen leeren Stapel gelegt werden return _playerCard.getNr() == 13; - }else { + } else if (!_topStack.isFaceUp()) { + return false; + } else { return (// Nummer nur aufsteigend - _topStack.getNr() == _playerCard.getNr() + 1) - && - // rot auf Schwarz - ( - ((_topStack.getSymbol() == Symbol.Herz || _topStack.getSymbol() == Symbol.Karo) - && (_playerCard.getSymbol() == Symbol.Pik || _playerCard.getSymbol() == Symbol.Kreuz)) - || + _topStack.getNr() == _playerCard.getNr() + 1) && + // rot auf Schwarz + (((_topStack.getSymbol() == Symbol.Herz || _topStack.getSymbol() == Symbol.Karo) + && (_playerCard.getSymbol() == Symbol.Pik || _playerCard.getSymbol() == Symbol.Kreuz)) || // schwarz auf rot - ((_topStack.getSymbol() == Symbol.Pik || _topStack.getSymbol() == Symbol.Kreuz) - && (_playerCard.getSymbol() == Symbol.Herz || _playerCard.getSymbol() == Symbol.Karo)) - ); + ((_topStack.getSymbol() == Symbol.Pik || _topStack.getSymbol() == Symbol.Kreuz) + && (_playerCard.getSymbol() == Symbol.Herz + || _playerCard.getSymbol() == Symbol.Karo))); } } - - @Override protected void paintComponent(Graphics g) { // TODO Auto-generated method stub @@ -48,12 +44,10 @@ public class StartStack extends BaseStack { if (stackIsEmpty()) { g.setColor(Color.gray); g.fillRect(0, 0, this.getWidth(), IMAGE_HIGHT); - + g.setColor(Color.black); - g.drawRect(0, 0, this.getWidth()-1, IMAGE_HIGHT-1); + g.drawRect(0, 0, this.getWidth() - 1, IMAGE_HIGHT - 1); } } - - } diff --git a/src/test/java/solitaer/StartStackTest.java b/src/test/java/solitaer/StartStackTest.java index e9515e8..d033e45 100644 --- a/src/test/java/solitaer/StartStackTest.java +++ b/src/test/java/solitaer/StartStackTest.java @@ -29,8 +29,9 @@ class StartStackTest { Arguments.of("5-Pik auf 6-Karo", new Card(6, Symbol.Karo, true), new Card(5, Symbol.Pik, true), true), Arguments.of("König-Karo auf Ass-Kreuz", new Card(1, Symbol.Kreuz, true), new Card(13, Symbol.Karo, true), false), Arguments.of("5-Karo auf 7-Kreuz", new Card(7, Symbol.Kreuz, true), new Card(5, Symbol.Karo, true), false), - Arguments.of("2-Herz auf Ass-Kreuz", new Card(2, Symbol.Herz, true), new Card(1, Symbol.Kreuz, true), true), - Arguments.of("null auf null", null, null, false) + Arguments.of("Ass-Herz auf 2-Kreuz", new Card(2, Symbol.Herz, true), new Card(1, Symbol.Kreuz, true), true), + Arguments.of("null auf null", null, null, false), + Arguments.of("Ass-Herz auf face-Down-2-Kreuz", new Card(2, Symbol.Herz, false), new Card(1, Symbol.Kreuz, true), false) ); } From 3ad5083c354c4999ba1c9b2ae4595f7c2a45d9f3 Mon Sep 17 00:00:00 2001 From: Alexander Hartung Date: Sun, 30 Jan 2022 22:43:43 +0100 Subject: [PATCH 34/54] Refactor Card and StartStack --- src/main/java/solitaer/Card.java | 12 +++++++++++- src/main/java/solitaer/StartStack.java | 9 +++------ 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/src/main/java/solitaer/Card.java b/src/main/java/solitaer/Card.java index af55cfc..5cad36d 100644 --- a/src/main/java/solitaer/Card.java +++ b/src/main/java/solitaer/Card.java @@ -39,6 +39,16 @@ public class Card extends JPanel { public int getNr() { return nr; } + + public boolean isred() { + return this.symbol == Symbol.Herz + || this.symbol == Symbol.Karo; + } + + public boolean isblack() { + return this.symbol == Symbol.Kreuz + || this.symbol == Symbol.Pik; + } private String getNrText() { if (this.nr < 10) { @@ -107,7 +117,7 @@ public class Card extends JPanel { g.setColor(Color.black); g.drawRect(0, 0, this.getWidth() - 1, this.getHeight() - 1); - if (this.symbol == Symbol.Herz || this.symbol == Symbol.Karo) + if (this.isred()) g.setColor(Color.red); else g.setColor(Color.black); diff --git a/src/main/java/solitaer/StartStack.java b/src/main/java/solitaer/StartStack.java index 0dd2f8f..9c66b1d 100644 --- a/src/main/java/solitaer/StartStack.java +++ b/src/main/java/solitaer/StartStack.java @@ -26,14 +26,11 @@ public class StartStack extends BaseStack { return false; } else { return (// Nummer nur aufsteigend - _topStack.getNr() == _playerCard.getNr() + 1) && + (_topStack.getNr() == _playerCard.getNr() + 1) && // rot auf Schwarz - (((_topStack.getSymbol() == Symbol.Herz || _topStack.getSymbol() == Symbol.Karo) - && (_playerCard.getSymbol() == Symbol.Pik || _playerCard.getSymbol() == Symbol.Kreuz)) || + ((_topStack.isred() && _playerCard.isblack()) || // schwarz auf rot - ((_topStack.getSymbol() == Symbol.Pik || _topStack.getSymbol() == Symbol.Kreuz) - && (_playerCard.getSymbol() == Symbol.Herz - || _playerCard.getSymbol() == Symbol.Karo))); + (_topStack.isblack() && _playerCard.isred()))); } } From a0409b6b94e6f5b8c73008b54fd644bae2898e7f Mon Sep 17 00:00:00 2001 From: Alexander Hartung Date: Fri, 4 Feb 2022 16:04:03 +0100 Subject: [PATCH 35/54] Set Layout StartStacks --- src/main/java/solitaer/SolitaerGamePanel.java | 92 +++++++++++-------- 1 file changed, 53 insertions(+), 39 deletions(-) diff --git a/src/main/java/solitaer/SolitaerGamePanel.java b/src/main/java/solitaer/SolitaerGamePanel.java index 7eaf634..374b937 100644 --- a/src/main/java/solitaer/SolitaerGamePanel.java +++ b/src/main/java/solitaer/SolitaerGamePanel.java @@ -8,10 +8,19 @@ import javax.swing.JPanel; public class SolitaerGamePanel extends JPanel { private static final long serialVersionUID = 1L; + + private final int OFFSET_STACKS = 5; + public final int IMAGE_WIDTH = 72; + public final int IMAGE_HIGHT = 96; + private CardDeck deck; private MyMouseListener mouseL; private SaveStack save =new SaveStack(500,250); + private StartStack[] start = new StartStack[7] ; + + + public SolitaerGamePanel() { @@ -20,48 +29,53 @@ public class SolitaerGamePanel extends JPanel { mouseL = new MyMouseListener(save); this.addMouseListener(mouseL); - deck = new CardDeck(); - - - StartStack a = new StartStack(25,125); - - deck.getDeck().get(5).setFaceUp(true); - a.addCard((deck.getDeck().get(5))); - - deck.getDeck().get(4).setFaceUp(true); - a.addCard((deck.getDeck().get(4))); - - deck.getDeck().get(3).setFaceUp(true); - a.addCard((deck.getDeck().get(3))); - deck.getDeck().get(2).setFaceUp(true); - a.addCard((deck.getDeck().get(2))); - - deck.getDeck().get(1).setFaceUp(true); - a.addCard((deck.getDeck().get(1))); - - deck.getDeck().get(0).setFaceUp(true); - a.addCard(deck.getDeck().get(0)); - - this.add(a); - - StartStack b = new StartStack(200,125); - - deck.getDeck().get(32).setFaceUp(true); - b.addCard((deck.getDeck().get(32))); - this.add(b); - - StartStack c = new StartStack(375,125); - - //deck.getDeck().get(20).setFaceUp(true); - c.addCard((deck.getDeck().get(20))); - this.add(c); - - - StartStack d = new StartStack(475,125); - this.add(d); + for(int i = 0; i<7; i++) { + int x = (((IMAGE_WIDTH+OFFSET_STACKS)*i)+OFFSET_STACKS); + System.out.println(x); + start[i] = new StartStack(x, 125); + this.add(start[i]); + } + +// StartStack a = new StartStack(25,125); +// +// deck.getDeck().get(5).setFaceUp(true); +// a.addCard((deck.getDeck().get(5))); +// +// deck.getDeck().get(4).setFaceUp(true); +// a.addCard((deck.getDeck().get(4))); +// +// deck.getDeck().get(3).setFaceUp(true); +// a.addCard((deck.getDeck().get(3))); +// +// deck.getDeck().get(2).setFaceUp(true); +// a.addCard((deck.getDeck().get(2))); +// +// deck.getDeck().get(1).setFaceUp(true); +// a.addCard((deck.getDeck().get(1))); +// +// deck.getDeck().get(0).setFaceUp(true); +// a.addCard(deck.getDeck().get(0)); +// +// this.add(a); +// +// StartStack b = new StartStack(200,125); +// +// deck.getDeck().get(32).setFaceUp(true); +// b.addCard((deck.getDeck().get(32))); +// this.add(b); +// +// StartStack c = new StartStack(375,125); +// +// //deck.getDeck().get(20).setFaceUp(true); +// c.addCard((deck.getDeck().get(20))); +// this.add(c); +// +// +// StartStack d = new StartStack(475,125); +// this.add(d); //save = new SaveStack(500,250); this.add(save); From d79fd583f551c6faca906d4230b8b2cd0f7cd818 Mon Sep 17 00:00:00 2001 From: Alexander Hartung Date: Fri, 4 Feb 2022 16:13:05 +0100 Subject: [PATCH 36/54] Set Layout AblageStacks --- src/main/java/solitaer/SolitaerGamePanel.java | 72 +++++++------------ 1 file changed, 25 insertions(+), 47 deletions(-) diff --git a/src/main/java/solitaer/SolitaerGamePanel.java b/src/main/java/solitaer/SolitaerGamePanel.java index 374b937..7e867a7 100644 --- a/src/main/java/solitaer/SolitaerGamePanel.java +++ b/src/main/java/solitaer/SolitaerGamePanel.java @@ -18,6 +18,7 @@ public class SolitaerGamePanel extends JPanel { private SaveStack save =new SaveStack(500,250); private StartStack[] start = new StartStack[7] ; + private AblageStack[] ablage = new AblageStack[4]; @@ -39,56 +40,33 @@ public class SolitaerGamePanel extends JPanel { this.add(start[i]); } -// StartStack a = new StartStack(25,125); -// -// deck.getDeck().get(5).setFaceUp(true); -// a.addCard((deck.getDeck().get(5))); -// -// deck.getDeck().get(4).setFaceUp(true); -// a.addCard((deck.getDeck().get(4))); -// -// deck.getDeck().get(3).setFaceUp(true); -// a.addCard((deck.getDeck().get(3))); -// -// deck.getDeck().get(2).setFaceUp(true); -// a.addCard((deck.getDeck().get(2))); -// -// deck.getDeck().get(1).setFaceUp(true); -// a.addCard((deck.getDeck().get(1))); -// -// deck.getDeck().get(0).setFaceUp(true); -// a.addCard(deck.getDeck().get(0)); -// -// this.add(a); -// -// StartStack b = new StartStack(200,125); -// -// deck.getDeck().get(32).setFaceUp(true); -// b.addCard((deck.getDeck().get(32))); -// this.add(b); -// -// StartStack c = new StartStack(375,125); -// -// //deck.getDeck().get(20).setFaceUp(true); -// c.addCard((deck.getDeck().get(20))); -// this.add(c); -// -// -// StartStack d = new StartStack(475,125); -// this.add(d); + - //save = new SaveStack(500,250); - this.add(save); + for(int i = 0; i<4; i++) { + int x = (((IMAGE_WIDTH+OFFSET_STACKS)*(3+i))+OFFSET_STACKS); + switch (i) { + case 0: + ablage[i] = new AblageStack(x, 10, Symbol.Herz); + break; + case 1: + ablage[i] = new AblageStack(x, 10, Symbol.Kreuz); + break; + case 2: + ablage[i] = new AblageStack(x, 10, Symbol.Karo); + break; + case 3: + ablage[i] = new AblageStack(x, 10, Symbol.Pik); + break; + + default: + break; + } + this.add(ablage[i]); + } - AblageStack a1 = new AblageStack(200, 10, Symbol.Herz); - this.add(a1); - AblageStack a2 = new AblageStack(275, 10, Symbol.Kreuz); - this.add(a2); - AblageStack a3 = new AblageStack(350, 10, Symbol.Karo); - this.add(a3); - AblageStack a4 = new AblageStack(425, 10, Symbol.Pik); - this.add(a4); + //save = new SaveStack(500,250); + this.add(save); WasteStack w = new WasteStack(85, 10); From 8be8a7096b9d9b3a76492a6386488c49b95e4478 Mon Sep 17 00:00:00 2001 From: Alexander Hartung Date: Fri, 4 Feb 2022 16:19:21 +0100 Subject: [PATCH 37/54] Set Layout Geber- WasteStack --- src/main/java/solitaer/SolitaerGamePanel.java | 37 +++++++------------ 1 file changed, 14 insertions(+), 23 deletions(-) diff --git a/src/main/java/solitaer/SolitaerGamePanel.java b/src/main/java/solitaer/SolitaerGamePanel.java index 7e867a7..84454cd 100644 --- a/src/main/java/solitaer/SolitaerGamePanel.java +++ b/src/main/java/solitaer/SolitaerGamePanel.java @@ -9,7 +9,9 @@ public class SolitaerGamePanel extends JPanel { private static final long serialVersionUID = 1L; - private final int OFFSET_STACKS = 5; + private final int OFFSET_STACKS_X = 5; + private final int OFFSET_STACKS_Y = 10; + public final int IMAGE_WIDTH = 72; public final int IMAGE_HIGHT = 96; @@ -20,6 +22,9 @@ public class SolitaerGamePanel extends JPanel { private StartStack[] start = new StartStack[7] ; private AblageStack[] ablage = new AblageStack[4]; + private WasteStack w;// = new WasteStack(85, 10); + private GeberStack g;// = new GeberStack(10, 10, w); + @@ -34,7 +39,7 @@ public class SolitaerGamePanel extends JPanel { for(int i = 0; i<7; i++) { - int x = (((IMAGE_WIDTH+OFFSET_STACKS)*i)+OFFSET_STACKS); + int x = (((IMAGE_WIDTH+OFFSET_STACKS_X)*i)+OFFSET_STACKS_X); System.out.println(x); start[i] = new StartStack(x, 125); this.add(start[i]); @@ -43,19 +48,19 @@ public class SolitaerGamePanel extends JPanel { for(int i = 0; i<4; i++) { - int x = (((IMAGE_WIDTH+OFFSET_STACKS)*(3+i))+OFFSET_STACKS); + int x = (((IMAGE_WIDTH+OFFSET_STACKS_X)*(3+i))+OFFSET_STACKS_X); switch (i) { case 0: - ablage[i] = new AblageStack(x, 10, Symbol.Herz); + ablage[i] = new AblageStack(x, OFFSET_STACKS_Y, Symbol.Herz); break; case 1: - ablage[i] = new AblageStack(x, 10, Symbol.Kreuz); + ablage[i] = new AblageStack(x, OFFSET_STACKS_Y, Symbol.Kreuz); break; case 2: - ablage[i] = new AblageStack(x, 10, Symbol.Karo); + ablage[i] = new AblageStack(x, OFFSET_STACKS_Y, Symbol.Karo); break; case 3: - ablage[i] = new AblageStack(x, 10, Symbol.Pik); + ablage[i] = new AblageStack(x, OFFSET_STACKS_Y, Symbol.Pik); break; default: @@ -69,22 +74,8 @@ public class SolitaerGamePanel extends JPanel { this.add(save); - WasteStack w = new WasteStack(85, 10); - GeberStack g = new GeberStack(10, 10, w); - - deck.getDeck().get(34).setFaceUp(true); - w.addCard(deck.getDeck().get(34)); - deck.getDeck().get(35).setFaceUp(true); - w.addCard(deck.getDeck().get(35)); - deck.getDeck().get(36).setFaceUp(true); - w.addCard(deck.getDeck().get(36)); - deck.getDeck().get(37).setFaceUp(true); - w.addCard(deck.getDeck().get(37)); - - - g.addCard(deck.getDeck().get(38)); - - + w = new WasteStack((IMAGE_WIDTH+(OFFSET_STACKS_X)*2), OFFSET_STACKS_Y); + g = new GeberStack(OFFSET_STACKS_X, OFFSET_STACKS_Y, w); this.add(w); this.add(g); From c5a31c3991a952a682b5f007299c6766d71e4476 Mon Sep 17 00:00:00 2001 From: Alexander Hartung Date: Fri, 4 Feb 2022 16:28:19 +0100 Subject: [PATCH 38/54] Set Layout SaveStack --- src/main/java/solitaer/SolitaerGamePanel.java | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/main/java/solitaer/SolitaerGamePanel.java b/src/main/java/solitaer/SolitaerGamePanel.java index 84454cd..3aa618b 100644 --- a/src/main/java/solitaer/SolitaerGamePanel.java +++ b/src/main/java/solitaer/SolitaerGamePanel.java @@ -1,8 +1,10 @@ package solitaer; import java.awt.Color; +import java.awt.Font; import java.awt.Graphics; +import javax.swing.JLabel; import javax.swing.JPanel; public class SolitaerGamePanel extends JPanel { @@ -18,7 +20,7 @@ public class SolitaerGamePanel extends JPanel { private CardDeck deck; private MyMouseListener mouseL; - private SaveStack save =new SaveStack(500,250); + private SaveStack save;// =new SaveStack(500,250); private StartStack[] start = new StartStack[7] ; private AblageStack[] ablage = new AblageStack[4]; @@ -70,7 +72,13 @@ public class SolitaerGamePanel extends JPanel { } - //save = new SaveStack(500,250); + int Offset_x_Save = (((IMAGE_WIDTH+OFFSET_STACKS_X)*8)+OFFSET_STACKS_X); + JLabel label = new JLabel(); + label.setText("selected Cards"); + label.setBounds(Offset_x_Save, 100, 200,25); + this.add(label); + + save = new SaveStack(Offset_x_Save,125); this.add(save); From d477a4f2e3062579a5782656e54b522dc546f4f3 Mon Sep 17 00:00:00 2001 From: Alexander Hartung Date: Fri, 4 Feb 2022 16:45:55 +0100 Subject: [PATCH 39/54] Refactor SolitaerGamePanel --- src/main/java/solitaer/SolitaerGamePanel.java | 97 ++++++++++--------- 1 file changed, 51 insertions(+), 46 deletions(-) diff --git a/src/main/java/solitaer/SolitaerGamePanel.java b/src/main/java/solitaer/SolitaerGamePanel.java index 3aa618b..2c22ba6 100644 --- a/src/main/java/solitaer/SolitaerGamePanel.java +++ b/src/main/java/solitaer/SolitaerGamePanel.java @@ -10,59 +10,55 @@ import javax.swing.JPanel; public class SolitaerGamePanel extends JPanel { private static final long serialVersionUID = 1L; - + private final int OFFSET_STACKS_X = 5; - private final int OFFSET_STACKS_Y = 10; + private final int OFFSET_STACKS_Y = 15; public final int IMAGE_WIDTH = 72; public final int IMAGE_HIGHT = 96; - + + public final int STARTSTACK_SIZE = 7; + public final int ABLAGESTACK_SIZE = 4; + private CardDeck deck; private MyMouseListener mouseL; - - private SaveStack save;// =new SaveStack(500,250); - private StartStack[] start = new StartStack[7] ; + + private SaveStack save; + private StartStack[] start = new StartStack[7]; private AblageStack[] ablage = new AblageStack[4]; - - private WasteStack w;// = new WasteStack(85, 10); - private GeberStack g;// = new GeberStack(10, 10, w); - - - - - + + private WasteStack waste; + private GeberStack geber; + public SolitaerGamePanel() { setLayout(null); - + mouseL = new MyMouseListener(save); this.addMouseListener(mouseL); - deck = new CardDeck(); - + deck = new CardDeck(); - for(int i = 0; i<7; i++) { - int x = (((IMAGE_WIDTH+OFFSET_STACKS_X)*i)+OFFSET_STACKS_X); - System.out.println(x); - start[i] = new StartStack(x, 125); + for (int i = 0; i < STARTSTACK_SIZE; i++) { + int y = setLayouty(1); + start[i] = new StartStack(setLayoutX(i), y); this.add(start[i]); } - - - - for(int i = 0; i<4; i++) { - int x = (((IMAGE_WIDTH+OFFSET_STACKS_X)*(3+i))+OFFSET_STACKS_X); + + for (int i = 0; i < ABLAGESTACK_SIZE; i++) { + int x = setLayoutX(((STARTSTACK_SIZE - ABLAGESTACK_SIZE) + i)); + int y = setLayouty(0); switch (i) { case 0: - ablage[i] = new AblageStack(x, OFFSET_STACKS_Y, Symbol.Herz); + ablage[i] = new AblageStack(x, y, Symbol.Herz); break; case 1: - ablage[i] = new AblageStack(x, OFFSET_STACKS_Y, Symbol.Kreuz); + ablage[i] = new AblageStack(x, y, Symbol.Kreuz); break; case 2: - ablage[i] = new AblageStack(x, OFFSET_STACKS_Y, Symbol.Karo); + ablage[i] = new AblageStack(x, y, Symbol.Karo); break; case 3: - ablage[i] = new AblageStack(x, OFFSET_STACKS_Y, Symbol.Pik); + ablage[i] = new AblageStack(x, y, Symbol.Pik); break; default: @@ -70,32 +66,41 @@ public class SolitaerGamePanel extends JPanel { } this.add(ablage[i]); } + + int Offset_x_Save = setLayoutX(STARTSTACK_SIZE + 1); + int Offset_y_Save = setLayouty(1); - - int Offset_x_Save = (((IMAGE_WIDTH+OFFSET_STACKS_X)*8)+OFFSET_STACKS_X); JLabel label = new JLabel(); label.setText("selected Cards"); - label.setBounds(Offset_x_Save, 100, 200,25); + label.setBounds(Offset_x_Save, Offset_y_Save - 25, 200, 25); this.add(label); - - save = new SaveStack(Offset_x_Save,125); + + save = new SaveStack(Offset_x_Save, Offset_y_Save); this.add(save); - - - w = new WasteStack((IMAGE_WIDTH+(OFFSET_STACKS_X)*2), OFFSET_STACKS_Y); - g = new GeberStack(OFFSET_STACKS_X, OFFSET_STACKS_Y, w); - this.add(w); - this.add(g); - - + + waste = new WasteStack(setLayoutX(1), OFFSET_STACKS_Y); + geber = new GeberStack(setLayoutX(0), OFFSET_STACKS_Y, waste); + this.add(waste); + this.add(geber); + + } + + private int setLayoutX(int _spalte) { + return (((IMAGE_WIDTH + OFFSET_STACKS_X) * _spalte) + OFFSET_STACKS_X); } - - + + private int setLayouty(int _row) { + if(_row == 1) + return IMAGE_HIGHT + (OFFSET_STACKS_Y * 3); + else + return OFFSET_STACKS_Y; + } + @Override protected void paintComponent(Graphics g) { // TODO Auto-generated method stub super.paintComponent(g); - g.setColor(Color.green); + g.setColor(new Color(0, 135, 62)); g.fillRect(0, 0, this.getWidth(), this.getHeight()); } } From 3576bf037069015f5d98bd87e725aad77c43f71c Mon Sep 17 00:00:00 2001 From: Alexander Hartung Date: Fri, 4 Feb 2022 16:57:15 +0100 Subject: [PATCH 40/54] ADD Cards to StartStacks --- src/main/java/solitaer/SolitaerGamePanel.java | 34 +++++++++++++------ 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/src/main/java/solitaer/SolitaerGamePanel.java b/src/main/java/solitaer/SolitaerGamePanel.java index 2c22ba6..5d1165f 100644 --- a/src/main/java/solitaer/SolitaerGamePanel.java +++ b/src/main/java/solitaer/SolitaerGamePanel.java @@ -32,17 +32,40 @@ public class SolitaerGamePanel extends JPanel { public SolitaerGamePanel() { setLayout(null); + + + int Offset_x_Save = setLayoutX(STARTSTACK_SIZE + 1); + int Offset_y_Save = setLayouty(1); + + JLabel label = new JLabel(); + label.setText("selected Cards"); + label.setBounds(Offset_x_Save, Offset_y_Save - 25, 200, 25); + this.add(label); + + save = new SaveStack(Offset_x_Save, Offset_y_Save); + this.add(save); + mouseL = new MyMouseListener(save); this.addMouseListener(mouseL); deck = new CardDeck(); + System.out.println(deck.getDeck().size()); for (int i = 0; i < STARTSTACK_SIZE; i++) { int y = setLayouty(1); start[i] = new StartStack(setLayoutX(i), y); + int tmp = i; + while(tmp != 0) { + start[i].addCard(deck.getDeck().remove(0)); + tmp -= 1; + } + Card card = deck.getDeck().remove(0); + card.setFaceUp(true); + start[i].addCard(card); this.add(start[i]); } + System.out.println(deck.getDeck().size()); for (int i = 0; i < ABLAGESTACK_SIZE; i++) { int x = setLayoutX(((STARTSTACK_SIZE - ABLAGESTACK_SIZE) + i)); @@ -67,17 +90,6 @@ public class SolitaerGamePanel extends JPanel { this.add(ablage[i]); } - int Offset_x_Save = setLayoutX(STARTSTACK_SIZE + 1); - int Offset_y_Save = setLayouty(1); - - JLabel label = new JLabel(); - label.setText("selected Cards"); - label.setBounds(Offset_x_Save, Offset_y_Save - 25, 200, 25); - this.add(label); - - save = new SaveStack(Offset_x_Save, Offset_y_Save); - this.add(save); - waste = new WasteStack(setLayoutX(1), OFFSET_STACKS_Y); geber = new GeberStack(setLayoutX(0), OFFSET_STACKS_Y, waste); this.add(waste); From abecb9f8be2acd55af87ca423db6d2fda7eaab28 Mon Sep 17 00:00:00 2001 From: Alexander Hartung Date: Fri, 4 Feb 2022 17:02:57 +0100 Subject: [PATCH 41/54] ADD all remaining Cards to GeberStack --- src/main/java/solitaer/SolitaerGamePanel.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/java/solitaer/SolitaerGamePanel.java b/src/main/java/solitaer/SolitaerGamePanel.java index 5d1165f..86b40c8 100644 --- a/src/main/java/solitaer/SolitaerGamePanel.java +++ b/src/main/java/solitaer/SolitaerGamePanel.java @@ -33,7 +33,6 @@ public class SolitaerGamePanel extends JPanel { public SolitaerGamePanel() { setLayout(null); - int Offset_x_Save = setLayoutX(STARTSTACK_SIZE + 1); int Offset_y_Save = setLayouty(1); @@ -45,12 +44,10 @@ public class SolitaerGamePanel extends JPanel { save = new SaveStack(Offset_x_Save, Offset_y_Save); this.add(save); - mouseL = new MyMouseListener(save); this.addMouseListener(mouseL); deck = new CardDeck(); - System.out.println(deck.getDeck().size()); for (int i = 0; i < STARTSTACK_SIZE; i++) { int y = setLayouty(1); @@ -65,7 +62,6 @@ public class SolitaerGamePanel extends JPanel { start[i].addCard(card); this.add(start[i]); } - System.out.println(deck.getDeck().size()); for (int i = 0; i < ABLAGESTACK_SIZE; i++) { int x = setLayoutX(((STARTSTACK_SIZE - ABLAGESTACK_SIZE) + i)); @@ -92,6 +88,11 @@ public class SolitaerGamePanel extends JPanel { waste = new WasteStack(setLayoutX(1), OFFSET_STACKS_Y); geber = new GeberStack(setLayoutX(0), OFFSET_STACKS_Y, waste); + + while(deck.getDeck().size() != 0) { + geber.addCard(deck.getDeck().remove(0)); + } + this.add(waste); this.add(geber); From 337594435a88245425e47e1cc5aa5cafa8e76cd4 Mon Sep 17 00:00:00 2001 From: Alexander Hartung Date: Fri, 4 Feb 2022 17:11:22 +0100 Subject: [PATCH 42/54] ADD last card to WasteStack --- src/main/java/solitaer/SolitaerGamePanel.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/solitaer/SolitaerGamePanel.java b/src/main/java/solitaer/SolitaerGamePanel.java index 86b40c8..0edca74 100644 --- a/src/main/java/solitaer/SolitaerGamePanel.java +++ b/src/main/java/solitaer/SolitaerGamePanel.java @@ -89,10 +89,14 @@ public class SolitaerGamePanel extends JPanel { waste = new WasteStack(setLayoutX(1), OFFSET_STACKS_Y); geber = new GeberStack(setLayoutX(0), OFFSET_STACKS_Y, waste); - while(deck.getDeck().size() != 0) { + while(deck.getDeck().size() != 1) { geber.addCard(deck.getDeck().remove(0)); } + Card card = deck.getDeck().remove(0); + card.setFaceUp(true); + waste.addCard(card); + this.add(waste); this.add(geber); From f6a2f009da39d5ed07355eaac95a499cc77d6821 Mon Sep 17 00:00:00 2001 From: Alexander Hartung Date: Fri, 4 Feb 2022 21:55:24 +0100 Subject: [PATCH 43/54] Add Shuffel for CardDeck --- src/main/java/solitaer/CardDeck.java | 6 ++++++ src/main/java/solitaer/SolitaerGamePanel.java | 1 + 2 files changed, 7 insertions(+) diff --git a/src/main/java/solitaer/CardDeck.java b/src/main/java/solitaer/CardDeck.java index 41a6518..3b49bdf 100644 --- a/src/main/java/solitaer/CardDeck.java +++ b/src/main/java/solitaer/CardDeck.java @@ -1,6 +1,7 @@ package solitaer; import java.util.ArrayList; +import java.util.Collections; public class CardDeck { @@ -33,4 +34,9 @@ public class CardDeck { return deck; } + + public void shuffelDeck() { + Collections.shuffle(deck); + } + } diff --git a/src/main/java/solitaer/SolitaerGamePanel.java b/src/main/java/solitaer/SolitaerGamePanel.java index 0edca74..26b1e18 100644 --- a/src/main/java/solitaer/SolitaerGamePanel.java +++ b/src/main/java/solitaer/SolitaerGamePanel.java @@ -48,6 +48,7 @@ public class SolitaerGamePanel extends JPanel { this.addMouseListener(mouseL); deck = new CardDeck(); + deck.shuffelDeck(); for (int i = 0; i < STARTSTACK_SIZE; i++) { int y = setLayouty(1); From 6c2aaeb146d57f157f6b27933c27ca66c487ebfe Mon Sep 17 00:00:00 2001 From: Alexander Hartung Date: Fri, 4 Feb 2022 22:08:17 +0100 Subject: [PATCH 44/54] Fix MouseListener --- src/main/java/solitaer/MyMouseListener.java | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/main/java/solitaer/MyMouseListener.java b/src/main/java/solitaer/MyMouseListener.java index 70aec81..d222ac6 100644 --- a/src/main/java/solitaer/MyMouseListener.java +++ b/src/main/java/solitaer/MyMouseListener.java @@ -29,14 +29,7 @@ public class MyMouseListener implements MouseInputListener { // TODO Auto-generated method stub System.out.println("DOWN"); Component com = SwingUtilities.getDeepestComponentAt(e.getComponent(), e.getX(), e.getY()); - -// // Leeres StartFeld -// if (com instanceof StartStack) { -// System.out.println("Leer Start"); -// -// } -// // Karte, die in einem StartStack liegt -// else + if ((com instanceof Card && com.getParent() instanceof StartStack) || (com instanceof StartStack && ((StartStack) com).stackIsEmpty())) { @@ -152,6 +145,12 @@ public class MyMouseListener implements MouseInputListener { } else { clearSaveStack(selectedStack); } + //Clear SaveStack click on SolitaerGamePanel + }else if(com instanceof SolitaerGamePanel || + com.getParent() instanceof SolitaerGamePanel && com instanceof StartStack ){ + if(saveStack.stackIsEmpty() == false) { + clearSaveStack(selectedStack); + } } } From b8ad7aca0676b7a6343ca8953003cf3eaa27b098 Mon Sep 17 00:00:00 2001 From: Alexander Hartung Date: Sun, 6 Feb 2022 15:30:15 +0100 Subject: [PATCH 45/54] Add SolitaerMenue --- src/main/java/hauptmenue/GameWindow.java | 7 +++--- src/main/java/solitaer/SolitaerMenue.java | 30 +++++++++++++++++++++++ 2 files changed, 34 insertions(+), 3 deletions(-) create mode 100644 src/main/java/solitaer/SolitaerMenue.java diff --git a/src/main/java/hauptmenue/GameWindow.java b/src/main/java/hauptmenue/GameWindow.java index a2c7479..7fe612d 100644 --- a/src/main/java/hauptmenue/GameWindow.java +++ b/src/main/java/hauptmenue/GameWindow.java @@ -5,18 +5,19 @@ import java.awt.Dimension; import javax.swing.JFrame; import solitaer.SolitaerGamePanel; +import solitaer.SolitaerMenue; public class GameWindow extends JFrame { - /** - * - */ private static final long serialVersionUID = 1L; private final SolitaerGamePanel gamePanel = new SolitaerGamePanel(); + + private SolitaerMenue smenue = new SolitaerMenue(); public GameWindow() { setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); gamePanel.setPreferredSize(new Dimension(1180, 780)); + this.setJMenuBar(smenue.getMenue()); add(gamePanel); pack(); diff --git a/src/main/java/solitaer/SolitaerMenue.java b/src/main/java/solitaer/SolitaerMenue.java new file mode 100644 index 0000000..e2c854b --- /dev/null +++ b/src/main/java/solitaer/SolitaerMenue.java @@ -0,0 +1,30 @@ +package solitaer; + +import javax.swing.JMenu; +import javax.swing.JMenuBar; +import javax.swing.JMenuItem; + +public class SolitaerMenue { + + JMenuBar menuBar = new JMenuBar(); + + JMenu menu = new JMenu("options"); + + JMenuItem restart = new JMenuItem("restart"); + JMenuItem quit = new JMenuItem("quit"); + + public SolitaerMenue() { + + this.menu.add(restart); + this.menu.addSeparator(); + this.menu.add(quit); + + this.menuBar.add(menu); + + } + + public JMenuBar getMenue() { + return menuBar; + } + +} From e902f029cebc1b7f86981d2b0a707772c20b108f Mon Sep 17 00:00:00 2001 From: Alexander Hartung Date: Sun, 6 Feb 2022 15:37:30 +0100 Subject: [PATCH 46/54] Add MouseInput MenueQuit-Button --- src/main/java/solitaer/SolitaerMenue.java | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/main/java/solitaer/SolitaerMenue.java b/src/main/java/solitaer/SolitaerMenue.java index e2c854b..76a86ef 100644 --- a/src/main/java/solitaer/SolitaerMenue.java +++ b/src/main/java/solitaer/SolitaerMenue.java @@ -1,10 +1,13 @@ package solitaer; +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; + import javax.swing.JMenu; import javax.swing.JMenuBar; import javax.swing.JMenuItem; -public class SolitaerMenue { +public class SolitaerMenue implements ActionListener{ JMenuBar menuBar = new JMenuBar(); @@ -15,10 +18,13 @@ public class SolitaerMenue { public SolitaerMenue() { + this.restart.addActionListener(this); this.menu.add(restart); this.menu.addSeparator(); + this.quit.addActionListener(this); this.menu.add(quit); + this.menuBar.add(menu); } @@ -27,4 +33,14 @@ public class SolitaerMenue { return menuBar; } + @Override + public void actionPerformed(ActionEvent e) { + // TODO Auto-generated method stub + if(e.getSource() == this.quit) { + System.out.println("quit"); + System.exit(0); + } + + } + } From 2f4e989b9bedbece9ff9fab593fdb61a00767e61 Mon Sep 17 00:00:00 2001 From: Alexander Hartung Date: Sun, 6 Feb 2022 15:50:21 +0100 Subject: [PATCH 47/54] Add methode restart --- src/main/java/solitaer/SolitaerGamePanel.java | 98 ++++++++++++++----- 1 file changed, 72 insertions(+), 26 deletions(-) diff --git a/src/main/java/solitaer/SolitaerGamePanel.java b/src/main/java/solitaer/SolitaerGamePanel.java index 26b1e18..7c9e70a 100644 --- a/src/main/java/solitaer/SolitaerGamePanel.java +++ b/src/main/java/solitaer/SolitaerGamePanel.java @@ -32,10 +32,10 @@ public class SolitaerGamePanel extends JPanel { public SolitaerGamePanel() { setLayout(null); - + int Offset_x_Save = setLayoutX(STARTSTACK_SIZE + 1); int Offset_y_Save = setLayouty(1); - + JLabel label = new JLabel(); label.setText("selected Cards"); label.setBounds(Offset_x_Save, Offset_y_Save - 25, 200, 25); @@ -43,25 +43,25 @@ public class SolitaerGamePanel extends JPanel { save = new SaveStack(Offset_x_Save, Offset_y_Save); this.add(save); - + mouseL = new MyMouseListener(save); this.addMouseListener(mouseL); - deck = new CardDeck(); - deck.shuffelDeck(); +// deck = new CardDeck(); +// deck.shuffelDeck(); for (int i = 0; i < STARTSTACK_SIZE; i++) { int y = setLayouty(1); start[i] = new StartStack(setLayoutX(i), y); - int tmp = i; - while(tmp != 0) { - start[i].addCard(deck.getDeck().remove(0)); - tmp -= 1; - } - Card card = deck.getDeck().remove(0); - card.setFaceUp(true); - start[i].addCard(card); - this.add(start[i]); +// int tmp = i; +// while (tmp != 0) { +// start[i].addCard(deck.getDeck().remove(0)); +// tmp -= 1; +// } +// Card card = deck.getDeck().remove(0); +// card.setFaceUp(true); +// start[i].addCard(card); +// this.add(start[i]); } for (int i = 0; i < ABLAGESTACK_SIZE; i++) { @@ -84,22 +84,24 @@ public class SolitaerGamePanel extends JPanel { default: break; } - this.add(ablage[i]); +// this.add(ablage[i]); } waste = new WasteStack(setLayoutX(1), OFFSET_STACKS_Y); geber = new GeberStack(setLayoutX(0), OFFSET_STACKS_Y, waste); + +// while (deck.getDeck().size() != 1) { +// geber.addCard(deck.getDeck().remove(0)); +// } +// +// Card card = deck.getDeck().remove(0); +// card.setFaceUp(true); +// waste.addCard(card); +// +// this.add(waste); +// this.add(geber); - while(deck.getDeck().size() != 1) { - geber.addCard(deck.getDeck().remove(0)); - } - - Card card = deck.getDeck().remove(0); - card.setFaceUp(true); - waste.addCard(card); - - this.add(waste); - this.add(geber); + restartGame(); } @@ -108,10 +110,54 @@ public class SolitaerGamePanel extends JPanel { } private int setLayouty(int _row) { - if(_row == 1) + if (_row == 1) return IMAGE_HIGHT + (OFFSET_STACKS_Y * 3); else return OFFSET_STACKS_Y; + } + + public void restartGame() { + deck = new CardDeck(); + deck.shuffelDeck(); + + for (int i = 0; i < STARTSTACK_SIZE; i++) { + int tmp = i; + while (tmp != 0) { + start[i].addCard(deck.getDeck().remove(0)); + tmp -= 1; + } + Card card = deck.getDeck().remove(0); + card.setFaceUp(true); + start[i].addCard(card); + this.add(start[i]); + + } + + + + for (int i = 0; i < ABLAGESTACK_SIZE; i++) { + this.add(ablage[i]); + } + + + while (deck.getDeck().size() != 1) { + geber.addCard(deck.getDeck().remove(0)); + } + + Card card = deck.getDeck().remove(0); + card.setFaceUp(true); + waste.addCard(card); + + this.add(waste); + this.add(geber); + + + + + + + + } @Override From c57f31ac025346a9f0ad5671871ffbd96eb8de57 Mon Sep 17 00:00:00 2001 From: Alexander Hartung Date: Sun, 6 Feb 2022 15:54:29 +0100 Subject: [PATCH 48/54] Add clearStack methode to BaseStack --- src/main/java/solitaer/BaseStack.java | 4 ++++ src/main/java/solitaer/SolitaerGamePanel.java | 11 +++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/main/java/solitaer/BaseStack.java b/src/main/java/solitaer/BaseStack.java index a94321d..5e78f37 100644 --- a/src/main/java/solitaer/BaseStack.java +++ b/src/main/java/solitaer/BaseStack.java @@ -24,6 +24,10 @@ public abstract class BaseStack extends JPanel { } offset = 0; } + + public void clearStack() { + stack.clear(); + } public boolean stackIsEmpty() { return stack.isEmpty(); diff --git a/src/main/java/solitaer/SolitaerGamePanel.java b/src/main/java/solitaer/SolitaerGamePanel.java index 7c9e70a..9a4bc87 100644 --- a/src/main/java/solitaer/SolitaerGamePanel.java +++ b/src/main/java/solitaer/SolitaerGamePanel.java @@ -42,7 +42,7 @@ public class SolitaerGamePanel extends JPanel { this.add(label); save = new SaveStack(Offset_x_Save, Offset_y_Save); - this.add(save); + mouseL = new MyMouseListener(save); this.addMouseListener(mouseL); @@ -121,6 +121,7 @@ public class SolitaerGamePanel extends JPanel { deck.shuffelDeck(); for (int i = 0; i < STARTSTACK_SIZE; i++) { + start[i].clearStack(); int tmp = i; while (tmp != 0) { start[i].addCard(deck.getDeck().remove(0)); @@ -136,10 +137,12 @@ public class SolitaerGamePanel extends JPanel { for (int i = 0; i < ABLAGESTACK_SIZE; i++) { + ablage[i].clearStack(); this.add(ablage[i]); } - + geber.clearStack(); + waste.clearStack(); while (deck.getDeck().size() != 1) { geber.addCard(deck.getDeck().remove(0)); } @@ -150,6 +153,10 @@ public class SolitaerGamePanel extends JPanel { this.add(waste); this.add(geber); + + + save.clearStack(); + this.add(save); From d478ae0cc636aeca585e8a080c88fa03c3f1f04b Mon Sep 17 00:00:00 2001 From: Alexander Hartung Date: Sun, 6 Feb 2022 15:56:55 +0100 Subject: [PATCH 49/54] Add MouseInput MenueRestart-Button --- src/main/java/hauptmenue/GameWindow.java | 2 +- src/main/java/solitaer/SolitaerMenue.java | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/main/java/hauptmenue/GameWindow.java b/src/main/java/hauptmenue/GameWindow.java index 7fe612d..9230044 100644 --- a/src/main/java/hauptmenue/GameWindow.java +++ b/src/main/java/hauptmenue/GameWindow.java @@ -12,7 +12,7 @@ public class GameWindow extends JFrame { private static final long serialVersionUID = 1L; private final SolitaerGamePanel gamePanel = new SolitaerGamePanel(); - private SolitaerMenue smenue = new SolitaerMenue(); + private SolitaerMenue smenue = new SolitaerMenue(gamePanel); public GameWindow() { setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); diff --git a/src/main/java/solitaer/SolitaerMenue.java b/src/main/java/solitaer/SolitaerMenue.java index 76a86ef..e3dbcb8 100644 --- a/src/main/java/solitaer/SolitaerMenue.java +++ b/src/main/java/solitaer/SolitaerMenue.java @@ -9,6 +9,8 @@ import javax.swing.JMenuItem; public class SolitaerMenue implements ActionListener{ + SolitaerGamePanel solitaerpanel; + JMenuBar menuBar = new JMenuBar(); JMenu menu = new JMenu("options"); @@ -16,7 +18,9 @@ public class SolitaerMenue implements ActionListener{ JMenuItem restart = new JMenuItem("restart"); JMenuItem quit = new JMenuItem("quit"); - public SolitaerMenue() { + public SolitaerMenue(SolitaerGamePanel _panel) { + + solitaerpanel = _panel; this.restart.addActionListener(this); this.menu.add(restart); @@ -41,6 +45,10 @@ public class SolitaerMenue implements ActionListener{ System.exit(0); } + if(e.getSource() == this.restart) { + solitaerpanel.restartGame(); + } + } } From 8a594b8918a445d087cb3198f92ce4efd1d704f3 Mon Sep 17 00:00:00 2001 From: Alexander Hartung Date: Sun, 6 Feb 2022 16:13:55 +0100 Subject: [PATCH 50/54] Fix render when restart --- src/main/java/solitaer/BaseStack.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/solitaer/BaseStack.java b/src/main/java/solitaer/BaseStack.java index 5e78f37..686b60f 100644 --- a/src/main/java/solitaer/BaseStack.java +++ b/src/main/java/solitaer/BaseStack.java @@ -27,6 +27,8 @@ public abstract class BaseStack extends JPanel { public void clearStack() { stack.clear(); + offset = 0; + RenderStackNew(); } public boolean stackIsEmpty() { From 6722a62792900ca9e5a7f5650aab2c3c1a8f1c5f Mon Sep 17 00:00:00 2001 From: Alexander Hartung Date: Sun, 6 Feb 2022 16:20:39 +0100 Subject: [PATCH 51/54] Refactor --- src/main/java/solitaer/BaseStack.java | 4 +- src/main/java/solitaer/SolitaerGamePanel.java | 45 ++----------------- src/main/java/solitaer/SolitaerMenue.java | 3 +- 3 files changed, 7 insertions(+), 45 deletions(-) diff --git a/src/main/java/solitaer/BaseStack.java b/src/main/java/solitaer/BaseStack.java index 686b60f..2b17330 100644 --- a/src/main/java/solitaer/BaseStack.java +++ b/src/main/java/solitaer/BaseStack.java @@ -12,8 +12,8 @@ public abstract class BaseStack extends JPanel { private static final long serialVersionUID = 1L; private ArrayList stack = new ArrayList(); private final int OFFSET_VALUE = 20; - int offset; - int addOffset; + private int offset; + private int addOffset; public BaseStack(boolean _offset) { // TODO Auto-generated constructor stub diff --git a/src/main/java/solitaer/SolitaerGamePanel.java b/src/main/java/solitaer/SolitaerGamePanel.java index 9a4bc87..4df5655 100644 --- a/src/main/java/solitaer/SolitaerGamePanel.java +++ b/src/main/java/solitaer/SolitaerGamePanel.java @@ -1,7 +1,6 @@ package solitaer; import java.awt.Color; -import java.awt.Font; import java.awt.Graphics; import javax.swing.JLabel; @@ -19,6 +18,8 @@ public class SolitaerGamePanel extends JPanel { public final int STARTSTACK_SIZE = 7; public final int ABLAGESTACK_SIZE = 4; + + private Color backgroundColor = new Color(0, 135, 62); private CardDeck deck; private MyMouseListener mouseL; @@ -42,26 +43,13 @@ public class SolitaerGamePanel extends JPanel { this.add(label); save = new SaveStack(Offset_x_Save, Offset_y_Save); - mouseL = new MyMouseListener(save); this.addMouseListener(mouseL); -// deck = new CardDeck(); -// deck.shuffelDeck(); - for (int i = 0; i < STARTSTACK_SIZE; i++) { int y = setLayouty(1); start[i] = new StartStack(setLayoutX(i), y); -// int tmp = i; -// while (tmp != 0) { -// start[i].addCard(deck.getDeck().remove(0)); -// tmp -= 1; -// } -// Card card = deck.getDeck().remove(0); -// card.setFaceUp(true); -// start[i].addCard(card); -// this.add(start[i]); } for (int i = 0; i < ABLAGESTACK_SIZE; i++) { @@ -84,22 +72,10 @@ public class SolitaerGamePanel extends JPanel { default: break; } -// this.add(ablage[i]); } waste = new WasteStack(setLayoutX(1), OFFSET_STACKS_Y); geber = new GeberStack(setLayoutX(0), OFFSET_STACKS_Y, waste); - -// while (deck.getDeck().size() != 1) { -// geber.addCard(deck.getDeck().remove(0)); -// } -// -// Card card = deck.getDeck().remove(0); -// card.setFaceUp(true); -// waste.addCard(card); -// -// this.add(waste); -// this.add(geber); restartGame(); @@ -131,11 +107,8 @@ public class SolitaerGamePanel extends JPanel { card.setFaceUp(true); start[i].addCard(card); this.add(start[i]); - } - - for (int i = 0; i < ABLAGESTACK_SIZE; i++) { ablage[i].clearStack(); this.add(ablage[i]); @@ -146,7 +119,6 @@ public class SolitaerGamePanel extends JPanel { while (deck.getDeck().size() != 1) { geber.addCard(deck.getDeck().remove(0)); } - Card card = deck.getDeck().remove(0); card.setFaceUp(true); waste.addCard(card); @@ -154,24 +126,15 @@ public class SolitaerGamePanel extends JPanel { this.add(waste); this.add(geber); - save.clearStack(); - this.add(save); - - - - - - - - + this.add(save); } @Override protected void paintComponent(Graphics g) { // TODO Auto-generated method stub super.paintComponent(g); - g.setColor(new Color(0, 135, 62)); + g.setColor(backgroundColor); g.fillRect(0, 0, this.getWidth(), this.getHeight()); } } diff --git a/src/main/java/solitaer/SolitaerMenue.java b/src/main/java/solitaer/SolitaerMenue.java index e3dbcb8..9845702 100644 --- a/src/main/java/solitaer/SolitaerMenue.java +++ b/src/main/java/solitaer/SolitaerMenue.java @@ -18,7 +18,7 @@ public class SolitaerMenue implements ActionListener{ JMenuItem restart = new JMenuItem("restart"); JMenuItem quit = new JMenuItem("quit"); - public SolitaerMenue(SolitaerGamePanel _panel) { + public SolitaerMenue(SolitaerGamePanel _panel) { solitaerpanel = _panel; @@ -28,7 +28,6 @@ public class SolitaerMenue implements ActionListener{ this.quit.addActionListener(this); this.menu.add(quit); - this.menuBar.add(menu); } From 788cf4762f39e4256ddc5b03a7221507c771defc Mon Sep 17 00:00:00 2001 From: Alexander Hartung Date: Sun, 6 Feb 2022 22:55:05 +0100 Subject: [PATCH 52/54] Fix MouseInput GeberStack --- src/main/java/solitaer/MyMouseListener.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/solitaer/MyMouseListener.java b/src/main/java/solitaer/MyMouseListener.java index d222ac6..0ad21bb 100644 --- a/src/main/java/solitaer/MyMouseListener.java +++ b/src/main/java/solitaer/MyMouseListener.java @@ -118,6 +118,11 @@ public class MyMouseListener implements MouseInputListener { } else { tempStack = (GeberStack) com.getParent(); } + + if(this.saveStack.stackIsEmpty() == false) { + clearSaveStack(selectedStack); + } + if (tempStack.stackIsEmpty()) { // Move all from Waste to Geber ((GeberStack) this.tempStack).swapWasteGeber(); From fee8ede7991fc58ba9f7c0150e967ab70b36b9cc Mon Sep 17 00:00:00 2001 From: Alexander Hartung Date: Tue, 15 Feb 2022 11:48:01 +0100 Subject: [PATCH 53/54] remove unused pictures --- src/main/java/solitaer/images/01Herz.png | Bin 523 -> 0 bytes src/main/java/solitaer/images/01Karo.png | Bin 539 -> 0 bytes src/main/java/solitaer/images/01Kreuz.png | Bin 564 -> 0 bytes src/main/java/solitaer/images/01Pik.png | Bin 506 -> 0 bytes src/main/java/solitaer/images/02Herz.png | Bin 530 -> 0 bytes src/main/java/solitaer/images/02Karo.png | Bin 546 -> 0 bytes src/main/java/solitaer/images/02Kreuz.png | Bin 574 -> 0 bytes src/main/java/solitaer/images/02Pik.png | Bin 517 -> 0 bytes src/main/java/solitaer/images/03Herz.png | Bin 532 -> 0 bytes src/main/java/solitaer/images/03Karo.png | Bin 547 -> 0 bytes src/main/java/solitaer/images/03Kreuz.png | Bin 576 -> 0 bytes src/main/java/solitaer/images/03Pik.png | Bin 518 -> 0 bytes src/main/java/solitaer/images/04Herz.png | Bin 530 -> 0 bytes src/main/java/solitaer/images/04Karo.png | Bin 547 -> 0 bytes src/main/java/solitaer/images/04Kreuz.png | Bin 574 -> 0 bytes src/main/java/solitaer/images/04Pik.png | Bin 516 -> 0 bytes src/main/java/solitaer/images/05Herz.png | Bin 531 -> 0 bytes src/main/java/solitaer/images/05Karo.png | Bin 548 -> 0 bytes src/main/java/solitaer/images/05Kreuz.png | Bin 575 -> 0 bytes src/main/java/solitaer/images/05Pik.png | Bin 519 -> 0 bytes src/main/java/solitaer/images/06Herz.png | Bin 540 -> 0 bytes src/main/java/solitaer/images/06Karo.png | Bin 555 -> 0 bytes src/main/java/solitaer/images/06Kreuz.png | Bin 584 -> 0 bytes src/main/java/solitaer/images/06Pik.png | Bin 527 -> 0 bytes src/main/java/solitaer/images/07Herz.png | Bin 525 -> 0 bytes src/main/java/solitaer/images/07Karo.png | Bin 542 -> 0 bytes src/main/java/solitaer/images/07Kreuz.png | Bin 567 -> 0 bytes src/main/java/solitaer/images/07Pik.png | Bin 510 -> 0 bytes src/main/java/solitaer/images/08Herz.png | Bin 543 -> 0 bytes src/main/java/solitaer/images/08Karo.png | Bin 557 -> 0 bytes src/main/java/solitaer/images/08Kreuz.png | Bin 588 -> 0 bytes src/main/java/solitaer/images/08Pik.png | Bin 530 -> 0 bytes src/main/java/solitaer/images/09Herz.png | Bin 540 -> 0 bytes src/main/java/solitaer/images/09Karo.png | Bin 555 -> 0 bytes src/main/java/solitaer/images/09Kreuz.png | Bin 584 -> 0 bytes src/main/java/solitaer/images/09Pik.png | Bin 527 -> 0 bytes src/main/java/solitaer/images/10Herz.png | Bin 523 -> 0 bytes src/main/java/solitaer/images/10Karo.png | Bin 539 -> 0 bytes src/main/java/solitaer/images/10Kreuz.png | Bin 563 -> 0 bytes src/main/java/solitaer/images/10Pik.png | Bin 507 -> 0 bytes src/main/java/solitaer/images/11Herz.png | Bin 499 -> 0 bytes src/main/java/solitaer/images/11Karo.png | Bin 518 -> 0 bytes src/main/java/solitaer/images/11Kreuz.png | Bin 540 -> 0 bytes src/main/java/solitaer/images/11Pik.png | Bin 483 -> 0 bytes src/main/java/solitaer/images/12Herz.png | Bin 509 -> 0 bytes src/main/java/solitaer/images/12Karo.png | Bin 525 -> 0 bytes src/main/java/solitaer/images/12Kreuz.png | Bin 552 -> 0 bytes src/main/java/solitaer/images/12Pik.png | Bin 494 -> 0 bytes src/main/java/solitaer/images/13Herz.png | Bin 511 -> 0 bytes src/main/java/solitaer/images/13Karo.png | Bin 527 -> 0 bytes src/main/java/solitaer/images/13Kreuz.png | Bin 554 -> 0 bytes src/main/java/solitaer/images/13Pik.png | Bin 495 -> 0 bytes src/main/java/solitaer/images/back.png | Bin 1361 -> 0 bytes src/main/java/solitaer/images/empty.png | Bin 7063 -> 0 bytes 54 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 src/main/java/solitaer/images/01Herz.png delete mode 100644 src/main/java/solitaer/images/01Karo.png delete mode 100644 src/main/java/solitaer/images/01Kreuz.png delete mode 100644 src/main/java/solitaer/images/01Pik.png delete mode 100644 src/main/java/solitaer/images/02Herz.png delete mode 100644 src/main/java/solitaer/images/02Karo.png delete mode 100644 src/main/java/solitaer/images/02Kreuz.png delete mode 100644 src/main/java/solitaer/images/02Pik.png delete mode 100644 src/main/java/solitaer/images/03Herz.png delete mode 100644 src/main/java/solitaer/images/03Karo.png delete mode 100644 src/main/java/solitaer/images/03Kreuz.png delete mode 100644 src/main/java/solitaer/images/03Pik.png delete mode 100644 src/main/java/solitaer/images/04Herz.png delete mode 100644 src/main/java/solitaer/images/04Karo.png delete mode 100644 src/main/java/solitaer/images/04Kreuz.png delete mode 100644 src/main/java/solitaer/images/04Pik.png delete mode 100644 src/main/java/solitaer/images/05Herz.png delete mode 100644 src/main/java/solitaer/images/05Karo.png delete mode 100644 src/main/java/solitaer/images/05Kreuz.png delete mode 100644 src/main/java/solitaer/images/05Pik.png delete mode 100644 src/main/java/solitaer/images/06Herz.png delete mode 100644 src/main/java/solitaer/images/06Karo.png delete mode 100644 src/main/java/solitaer/images/06Kreuz.png delete mode 100644 src/main/java/solitaer/images/06Pik.png delete mode 100644 src/main/java/solitaer/images/07Herz.png delete mode 100644 src/main/java/solitaer/images/07Karo.png delete mode 100644 src/main/java/solitaer/images/07Kreuz.png delete mode 100644 src/main/java/solitaer/images/07Pik.png delete mode 100644 src/main/java/solitaer/images/08Herz.png delete mode 100644 src/main/java/solitaer/images/08Karo.png delete mode 100644 src/main/java/solitaer/images/08Kreuz.png delete mode 100644 src/main/java/solitaer/images/08Pik.png delete mode 100644 src/main/java/solitaer/images/09Herz.png delete mode 100644 src/main/java/solitaer/images/09Karo.png delete mode 100644 src/main/java/solitaer/images/09Kreuz.png delete mode 100644 src/main/java/solitaer/images/09Pik.png delete mode 100644 src/main/java/solitaer/images/10Herz.png delete mode 100644 src/main/java/solitaer/images/10Karo.png delete mode 100644 src/main/java/solitaer/images/10Kreuz.png delete mode 100644 src/main/java/solitaer/images/10Pik.png delete mode 100644 src/main/java/solitaer/images/11Herz.png delete mode 100644 src/main/java/solitaer/images/11Karo.png delete mode 100644 src/main/java/solitaer/images/11Kreuz.png delete mode 100644 src/main/java/solitaer/images/11Pik.png delete mode 100644 src/main/java/solitaer/images/12Herz.png delete mode 100644 src/main/java/solitaer/images/12Karo.png delete mode 100644 src/main/java/solitaer/images/12Kreuz.png delete mode 100644 src/main/java/solitaer/images/12Pik.png delete mode 100644 src/main/java/solitaer/images/13Herz.png delete mode 100644 src/main/java/solitaer/images/13Karo.png delete mode 100644 src/main/java/solitaer/images/13Kreuz.png delete mode 100644 src/main/java/solitaer/images/13Pik.png delete mode 100644 src/main/java/solitaer/images/back.png delete mode 100644 src/main/java/solitaer/images/empty.png diff --git a/src/main/java/solitaer/images/01Herz.png b/src/main/java/solitaer/images/01Herz.png deleted file mode 100644 index 62d0956036088f5c44006ad1f8e3bcc22060673e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 523 zcmeAS@N?(olHy`uVBq!ia0vp^oEakt!FcyzVAc}{hNBKI z|FvH;lj!-F;`~XpA~dXLQ_>XC#cL!|k7{VgP4WJyy0jv&OMU4N>o6Nl_k}V?yNg8h zy*@4xsXyK|yGTU*sYc!@xQaVd9(iiUO?l+1ISm4Eakt!FczeW0sC5!%>Hq z|JtwlYiP{clD;9lO+4|ahPGRz;i;~`u%1ni7TI*=YaVsgw9`C#f8(RcMIxsHW2P+L zp>fpPvTJ`bh-@zs(SHgQe6&#J==@EOmWs@u@@SEW_)-gyviV)@K^py!CV$eXJJ~fo zs3xeZJ1Ay~lV#WcjxTDUNUEM`Md5yX=2u&cB zi)4;26yaa`!wck|{>YC(eIQ$1HTAqc0%e!V9Cg-|^ZGayrq};epoaU$sX!aSa+X~{ zgWH2@ye+waMj!6#{-m*QDbS@qmH>Sa{4t>GKhU@Fo06u8E?y&%iX03>Oz0nD_^v&E U`5oE^fRWDN>FVdQ&MBb@0DH9N+W-In diff --git a/src/main/java/solitaer/images/01Kreuz.png b/src/main/java/solitaer/images/01Kreuz.png deleted file mode 100644 index a202c885615d14cccd85cbfeb05b50a1036c08b3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 564 zcmeAS@N?(olHy`uVBq!ia0vp^oEakt!Fcyz;3{o)0oIMd zzvH(sF|+aS`&oA(=tf|od#kKySqPAke^u^Ayw;nwhxUcs*f0ET>8-Xb>2G1Vhwo{< zS$wPQuXUpQRkJsNxrgmm*>2d*RULABLp@Liq&m8FZ|Du6%6%a#z8%;XQk?)a#=F&a z)!zelhwMO1pmcOA$h5bOdqZyr0L=i2{smf5+fo~HV>(y$>J8ho|nPEWpnE~wti}Jq-OawXgR@>gzTA-jiNFUTu{an9+j{Fytdsq(W zUhl2EzXhRwS$qiM6L*7UHx3vIVCg!0ES=`5dZ)H diff --git a/src/main/java/solitaer/images/01Pik.png b/src/main/java/solitaer/images/01Pik.png deleted file mode 100644 index faa496eae00ca694295a9816f5cb18d65c464a15..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 506 zcmeAS@N?(olHy`uVBq!ia0vp^oAx>Eakt!FczeBbPL%h|9*R z@Ag~RqDYGbx5|o^h1>{CbZ`9|x0Uy|eCyuO>V*2>#QdxGHn?wP-xhk~eQWK? zZ3}O;?G3%XVLR9F726W~v!o&7A-92Qcz>_>cHo}Y8}HV?3lG)lzgc`}U&xJUpgA|D zb5)1jSbRwCs@WU%Lv|n)K*8wNT9CF@Tdkbc+Y2ds r66D}^kSl=Ra{&7i?%koo_{(l6_|9+QuMdxaamwK7>gTe~DWM4f_yye^ diff --git a/src/main/java/solitaer/images/02Herz.png b/src/main/java/solitaer/images/02Herz.png deleted file mode 100644 index 559fbbebcda0b7e008345bf5cb0327b40ea46200..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 530 zcmeAS@N?(olHy`uVBq!ia0vp^oEakt!FcyzV3w>S!x4v< z|JuXY#HJn8H#--;VD%b_)T0{OZjpwkx&p&$7TR>_Pl^5*)HOTkkA2vkDT@R89xatQ z>TKE79&~5QqyHPBy!RSMoi+2kKK_pYtF3X@l=CVK?wb8cBhL$HM*F9gKV-GzKtlV2 z`W`K;(TY12sNw!GNbV^Al*KS9|5Jf`raW3E!v9o5?o^-+P@=I&WPjRGZ;;8YMIz=) zcW54U{uyF3BJ_&ilVg)#%N6CDz_@1c MboFyt=akR{03n{`wEzGB diff --git a/src/main/java/solitaer/images/02Karo.png b/src/main/java/solitaer/images/02Karo.png deleted file mode 100644 index 028c2762d7bd5cc0f5cb08fcb3ce50cc3dc7e4ef..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 546 zcmeAS@N?(olHy`uVBq!ia0vp^oEakt!FczeW0sC5!%>Hq z|JtvqsED}UmfIKJCZ2dyL)$IV@Kje|SkIv3yNMaG#T9S9_7j zbRY_{nX>qYbr_J`0c3Or#dsBJx_?~0rb6TB?4Um`ntDqufZ_}Gh)xgE2>-Y&=BR$; z$AB*Lr9Y;DG;6qj{6FPU&^n+EBBuiXw2AUBtqAT~KV@-+M*pMeQ(!X}$Q)fNbJTt_ z#Ck`|F7u}vAR}dtE(DrTvlQg0^FaIDK^8BQIm*5i=n^pZ=u(k*O|URf9_(nK)_p-x zr-M8YRO4;Q^;Dzoa2Nln&^?;*Kv(Y3JnCGjt+(_?XOZas6y#t?nj*S*jYR4Y6Z*^k YNpqjy_Je*$fN{^@>FVdQ&MBb@04|v6<^TWy diff --git a/src/main/java/solitaer/images/02Kreuz.png b/src/main/java/solitaer/images/02Kreuz.png deleted file mode 100644 index 8a0fd4621f952f65b945028e960b8785ba6395c7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 574 zcmeAS@N?(olHy`uVBq!ia0vp^o6H~ja%;k}jjs@a>xx7uu1 z<=$9)$PP&USBLTKLx4hZK>2#nZ-I&WqTl#MzpdD?_Ey{8kQLt!!~u<(4l>4ltNac3 z8}6-pLvF-_OmW)E`#bDyW9{l~3vad6hTQOO{ks&%Xn`kgw>RW>qpjAPrHABz-U7Qv mZUxjQNWldUw;{mz%l@!hC6@j9?H9mw!QkoY=d#Wzp$PzocmZbs diff --git a/src/main/java/solitaer/images/02Pik.png b/src/main/java/solitaer/images/02Pik.png deleted file mode 100644 index 0a1e2742c2958a1adc8208604cbec9d62793e615..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 517 zcmeAS@N?(olHy`uVBq!ia0vp^oAs>Eakt!FczeW0nr50P9Ba z@Ag~lL`1fHthl+^L-Wmw4T}%;aan7<`MoOl#(#}B%d_}_SbjtJ*7+OUx3X^wz45)Z zcEz@Zx7zjs6)e8hW~=okH21LFRkNJc8{TtQhu#J%vAO+<;kHx9ZygyO7_kKs!NZB(CTB-30S8-0wq#@r!+y{YSs<-U+LL(aYfJ>gTe~ HDWM4f5~%(% diff --git a/src/main/java/solitaer/images/03Herz.png b/src/main/java/solitaer/images/03Herz.png deleted file mode 100644 index 05c7794ded6624585c53161a173f95268e28fc8a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 532 zcmeAS@N?(olHy`uVBq!ia0vp^oEakt!FczeXO@B^!x4v< z|NF0rh?w-6+o(IcMHrsy3JmMnlr%+j@tPkFJG=O&Y=5*+B;V^}`I?I0J}1kr_9Bt# zKoqn`^XUDJj~2=tT`F_5e9EJsF7u^7tix=kJo44tw*)8((z7h)=;f4BQmy(_LvLwCaF@3w6v=D2f6Rs&xfo*Q z(weXsuaC@6HU71W@&naB)z}Areceq+SCR+U~DsZ My85}Sb4q9e08{(q1ONa4 diff --git a/src/main/java/solitaer/images/03Karo.png b/src/main/java/solitaer/images/03Karo.png deleted file mode 100644 index da7c45d468da5f8ee534c8eb10823f26b53153d5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 547 zcmeAS@N?(olHy`uVBq!ia0vp^oEakt!FczeW0sC5!%>Hq z|JtvqsED}MS8oV!6Hh#0Z z20!vX6{z9m7T#*hlK!@8TVg+u zTCpK~EAQ|6LvdHl-UQ|z{uhwg&s80Ad&7UNH=&90T5rrj;)&5fH3186G5-#D+gQ6| z1Hb6E72lY@aaD)jXy^JJ_O@}a7Enw6RXLzt(yMYIHsu2u+DL}HZLM9sE%823bn&e= zTdgA!>Eakt!Fcze<0@u$0oIM- z-|e?BF*BQ;jJN8ZcBqfbTI~-+Ywd~+ z|ATT5%ZYwlcnC^sD36yy?w}y#fSa{0Ikt~lMd0BdlEakt!FcyzV3w>S!x4v< z|JuXY#HK0gn|%vkuzHO|>QN1Cw@AZNU4dbLTq{N51G{Di-I?;}|HenlWLk?v=1*C? zL-VMw=0ADuxKn{PAYT8YWg_NFf7Gw307(EvHGou}S7ERmke=fHF~CmLKKZCOQ0QYo z-=l!8*`HQcXu2R6`D^31}VA)CvutzP?A&rvm@X5Y=A_v~pq1 zQi~}-oA{pwe+=l#2g*x_?SUxt1l!itUL^8=3DCiPkEXBL0k*&%XC#VFn%T0&Rkc`~>8-4|GA0gP(~Pgg&e IbxsLQ0J_58k^lez diff --git a/src/main/java/solitaer/images/04Karo.png b/src/main/java/solitaer/images/04Karo.png deleted file mode 100644 index 4c37a84176457f1d57be15be14e0b4bc114837a3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 547 zcmeAS@N?(olHy`uVBq!ia0vp^oEakt!FczeW0sC5!%>Hq z|JtvqsED}UmfIKJCZ2dyL)$IV@Kje|SkIk amHMq+hx}BP^v!^g&*16m=d#Wzp$P!+MCMxn diff --git a/src/main/java/solitaer/images/04Kreuz.png b/src/main/java/solitaer/images/04Kreuz.png deleted file mode 100644 index acbfba91d74e04b725ef4ca882230a8490378765..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 574 zcmeAS@N?(olHy`uVBq!ia0vp^oZ^%!S2bvU^d$&sE=!iG5#}fPSJ{;F~2w*m@XJRUHx3vIVCg!0Fe$E`2YX_ diff --git a/src/main/java/solitaer/images/04Pik.png b/src/main/java/solitaer/images/04Pik.png deleted file mode 100644 index d33a44881739141cd42462d9b4baa08a42f8b188..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 516 zcmeAS@N?(olHy`uVBq!ia0vp^oA$>Eakt!Fcze<0@@VF_(=N zzvH)X3Gw{=@pfT#!O{(j5A|_bYrR>q;r{AviT~Xb>qDy(;zMqDZ{5GaeJlI6&>Qbt z_lDdK$UXcoF!ykr)|?=5zjDu`RJbOZrEakt!FcyzpqGLp!_fmz z{P<;gL>I4-NIj~d?H2j5@soyKK;BVr%{;G<Z`eL ziHP~qAJ$=erYx?|aQ_(8rLPGT{nsa|zjTM@QRkha<{;X)5~wOb?x^$6H9sV^Bwf#%N+`qLj| zGv(1Tpy=jD3q|e+^gS|PQ=#ep5yPebp3%rk!)x@XEGW1y+&Fi#tv>Iw|&K?#Q;BDA93!+49|9&?2U Qz{qCsboFyt=akR{0HPP;4FCWD diff --git a/src/main/java/solitaer/images/05Karo.png b/src/main/java/solitaer/images/05Karo.png deleted file mode 100644 index 45d75cae6bd3abd070b5d525dcbf2727d1f4a127..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 548 zcmeAS@N?(olHy`uVBq!ia0vp^oEakt!FcyzV3&+1!%>Hq z|Jtvqsff7l-dnMcEv`j$@fwNLqZ-<7k%p(b_)mq_1l;Rt589)7^!>(1zLs21HSSG$ zq`kC4!~J9R8X#Gy>HaaGYyFf*L4A+HBY{lwr8}lKe)?#C(wpKpi#mQ*?mAmg5-{dpIW?Q%HkgjWR5PCIcmT8 z(L#}YuaD+lK&yb-*nuVht$5_`^>LZV|1(|fMIzISMB+7pE&(Zbw(RoO)LZ&vGFTWW zZ~jzc%3_d1fz|{-RfF^d)hv~1EfTR$1e&O2r_m2|9MESA_lQmp`qNt^YM%lNgTSz! jO-WNwf@O#Z{bm0ca=_2&XlXhy_8B}~{an^LB{Ts5b-L%O diff --git a/src/main/java/solitaer/images/05Kreuz.png b/src/main/java/solitaer/images/05Kreuz.png deleted file mode 100644 index 7ab055a1da5c0b484637a7de6bde9666e635e393..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 575 zcmeAS@N?(olHy`uVBq!ia0vp^orH6x z;eT^Cgm2}o4!OM{y!G$WLvmNm-puE!4!z;tYP+g7L0)uQ=c1J%{R6ZA-KV8s-kN z4QTw|pxncDhvGzmhW=j+vKOeepX>M1TlzN^gIu~Cs4e)$>RWBLK%+p$ffWIb+z(U; z!a#$7eo5TlQX6tR0O*RVW;v_3C9VfL4JZfn%dIvL26`UkOQCPUK=%i46^Hs^!~ejy xt$#z_HgZ*m{AR6gl@%=uxe=J?KExPT>JtyE$KKsi)Cx=(44$rjF6*2UngE1f{>uOW diff --git a/src/main/java/solitaer/images/05Pik.png b/src/main/java/solitaer/images/05Pik.png deleted file mode 100644 index 6bbfab9ab0cc9d3dd2965c4bc39c19da4c70ae18..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 519 zcmeAS@N?(olHy`uVBq!ia0vp^oAw>Eakt!FczeW0nr50P9Ba z@Ag~RxVUcBRNvg}q4{RThQ){axU99_{9cuN--JwTiLgT-uT{H zyJFkITWz%~Hrx-nvHDhN zaRzGJ;NEJh^(HX)@IHk%p^5Tf<~Fd7@U6VnKy`;eJlVwcT)zVn_pbyQXAk65hpgC^ z7%vPom|yf;JCJ(=r1foUtuM^_e4rB+ANm&nvLDDSZ-F>*FUV!NhvT5S76Tpac*Fmy z91zEWT<8pPPH1AhKv~F*z(n^}SAUiO5sFc1T%QL`njxgN@xNA-NoVb diff --git a/src/main/java/solitaer/images/06Herz.png b/src/main/java/solitaer/images/06Herz.png deleted file mode 100644 index 04e7477972180d16619eeb2ee187d5f5113db8c1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 540 zcmeAS@N?(olHy`uVBq!ia0vp^oEakt!FczeW0sC5!%>Hq z|JtvqsE8cR@81~SCZ2dyL)$IV@Kje|SkI3h47K-G16>7E?iROEKTn1Dcx(CFW{%Pe8No_fh z(DWkFQ-L;9{Es?Yay`|M1Dfw_*)<=g(Y;U;h>p$?GfjZ2A+CZMP)0_`Eakt!FczeW0sC5!%>Hq z|JtwlduViROWzRQCZ2dyL)$IV@Kje|SkIwTXxx}9(C5dH|0?f*HbMZ70~yn`BPYo*TR^ivx`Lcr$8mw z0S##n(s2LyAEGPfq&XW`IlA%gA4(oN|F0Paz~fS9A$s1q4!jy?hH`F9?hdm zf$k{ObYBP-=UcjC$|G%%Ci%^efI>jkPy})lKTsoB0n7lPv!^VE_@F(=X3F9nQx;o* z$Vbtq0)cLk4yy@R_edM;ZeLBgQ_+Q*N9zOEJ(|8oA{9AElBS3*9%4c(>L2-^@H1>| Ro(oI_44$rjF6*2UngBT#?-c+5 diff --git a/src/main/java/solitaer/images/06Kreuz.png b/src/main/java/solitaer/images/06Kreuz.png deleted file mode 100644 index c79e6727f4bbe41ea1f7faf32a8f222191b92cb7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 584 zcmeAS@N?(olHy`uVBq!ia0vp^o+S^9566Xiv}y>F=vxgC&u*ltzs4SmsX ztF|Tn_q(zBR+}x5zxY<$-=&A-uA04>&s80I!@bp3E2KI>UUXaN?G620SLJTFZ)N`$ z2r^~GH|}pxC97(xxFF0wKn8NJWxm*V(E%)iTzp9KwXFGfEL;V zjdS11TO9(l;cpPoDTm@jfyVZ8{ayhQ2U@@QP~A$P4J&}Q{$2@mlnBV3U=yGeSbyjZ zeV|$p4utwAQ66kPP$kgr)raChQi=5|w}J4&Tg=r!i}$zu4SC!6H|T96(1{=)zNrtX w20E#F0np=h2jddmTV+MdLT&^OF~(QmdKI;Vst0021u$N&HU diff --git a/src/main/java/solitaer/images/06Pik.png b/src/main/java/solitaer/images/06Pik.png deleted file mode 100644 index 35e3403c443db87800f4c90e66db2ee282171b15..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 527 zcmeAS@N?(olHy`uVBq!ia0vp^oEakt!FczeBbRi9nCr&s zZ~HSuYYZ%w7?<$R6DbS15t!)SDl7V}`l{KR{~B-nugbmAziPLkKdb)Gye$50p*P;Q z)~?*P@Kzg;OsroCl#u=wa(lztLv{LZ7T;>K1!@CI{PzZ`+OR(aq&norbgpWxkm?Qk zqTiMtng?WqRM-oA3rvg$GQTYVniX=xeJd|WV#C^7ZGYWvxP!DWhZ^@y{mo*aKA_3z zhwQZ8c(>X@4Eo*9RlTYzopr03FK&s{jB1 diff --git a/src/main/java/solitaer/images/07Herz.png b/src/main/java/solitaer/images/07Herz.png deleted file mode 100644 index b16d6637329b15ee268ef5dd4e3df5d40c96b6da..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 525 zcmeAS@N?(olHy`uVBq!ia0vp^oEakt!FcyzVAc}{hNBKI z|FvH;ljxC5cm5<=5gOLBDQSx6;x!VfM>VwVG^RiDtkl-?`nW`-{&<)AQ;jK$f3yX~ zOnKy~`L9pZ{HccCslXaf%dYMq8_lElH$GY>;_vlQb?FYxqmzLmK+T#{ybA;Gb5E zF8*N)_K&aTJ&^FcDba<&UFJ{M0v+HMX?UtD5XI+1OX!t+)Rql?JLAh;fYHq0>FVdQ I&MBb@0FB<>+yDRo diff --git a/src/main/java/solitaer/images/07Karo.png b/src/main/java/solitaer/images/07Karo.png deleted file mode 100644 index 854f4f072eb4e64329009bb1627dd82253d3c8d1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 542 zcmeAS@N?(olHy`uVBq!ia0vp^oEakt!FcyzV3&+1!%>Hq z|Jtvqsff6KU-Pj>GOk5*@fwNLqZ-<7k%p(b_)mrI(Y)W~t$Arn%kAnIhxt|J*@ha4G|L7n2F`&zQ>5qv)Hd7t}<(fZ*#ds}@IXb&Y zbbrcGXOJngi$wUB0;SGRc@(tnQFD>VslY#NqWnuMg1hp)J}$HAlGp49nF*AcUL;a~ zwyQm8kLFSKryBRBEC!iaB+?!fnt~DtfnhyE cP3Rvp^OHS(f=*(uf$`4Z>FVdQ&MBb@0QEakt!Fcyz;3{o)0oIMd zzvH(sF}E4+`&oA(=tf|od#kKySqPAEf0gZq=~?z0+*|jC+}JPtEhyJ{EAQ`m(Qhj@ z^k+$bd*4zUa(jb2P{?~LZ*|Cx#kbo21}DmkehW&hU%8>5>-MVL8{Vy1{BM@tVy<4f zVLDfJ$nVBlpeCT`-xb?{DuD{N1LdQ)@?JH2v-nV))*F2wLm9#Z+4}pyzR=qn@_~YZ zxrgOICfkDyy#aR7cAy);P68S(f3+^5p9{zUsg1q?bW}CaZTX_#)*g}rn_UOw?uR(H zdgZo6`$KW7a)EBR4{`$6Zy>9m3*-$DzA6XO|JxhvHg}*?!A`&Nf5o@P+ST72T5VVT pJz#gJkIP!?&58|+hZy6P{jXZZ*n_r#Yk&!Y!PC{xWt~$(69A(@7Lfn| diff --git a/src/main/java/solitaer/images/07Pik.png b/src/main/java/solitaer/images/07Pik.png deleted file mode 100644 index 9391d2aa16195660d813fd540438e04da4647c6a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 510 zcmeAS@N?(olHy`uVBq!ia0vp^oAz>Eakt!FczedZxkXmAEaXODqI>J#xUIau`gjEd+n-iiTPS@_(i|1_}28-2WGjy=(m-J{sn*x23nurvUlaSg}2&3iswTVZ*T|t zrE!Bl(EZc7eg`GiuK+nPEakt!FczeW0sC5!%>Hq z|JtvqsED-w?%x>RCZ2dyL)$IV@Kje|SkIEau589)7^!~<2zLs21HRMhO z#sHDm$7Le*$Gh5#M5Y4~NWoH(e6Nq?YbrF3&JF^pfGWyA6}m^WwMcaOrwdFwi z_@Az=(3lU>dn(Xo%IY6&MI!deN1ZkAO?ed52S#1yOLt6J3_)P&G^jLK;*qbW-qYYh z&7npHIM!e?0YnQO+|2@lO?h%oh`fky*~P%3j8xqG+rb8W9z3d zn<+p8?@e+47|`W^YWbt|H4>@Fp^!91bny@qTJfKua^gO}?Ocv?ff3K(>FVdQ&MBb@ E0Mriby#N3J diff --git a/src/main/java/solitaer/images/08Karo.png b/src/main/java/solitaer/images/08Karo.png deleted file mode 100644 index 064e2349b1574d44e467959dcf1e8c1b688ecee5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 557 zcmeAS@N?(olHy`uVBq!ia0vp^o>Eakt!FcyzV3w>S!x4v< z|JuXY*rq+Tl?CYrS_2Ue z=j9%P8kl*K!y0G+uWL@x#^xCgdnA=F*`Pc`(OYVZNcr9g`` zfGRk(?KHwaI#$A62-F@Ab}}?HdNw6Z5nYTDKtn|66~EHKQ+`P^)~^I60|rl5KbLh* G2~7Z3R`Fo~ diff --git a/src/main/java/solitaer/images/08Kreuz.png b/src/main/java/solitaer/images/08Kreuz.png deleted file mode 100644 index 3ed11e711022282641ec081ed3b971e7e6ffc9f0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 588 zcmeAS@N?(olHy`uVBq!ia0vp^oT<5L4)uBMef4zYWhzdENHG#Q@<*vrvSPxbQwcbwa z4af$;Z>u0SySD<`(2HG^ybngR4m=xv}8AZPrZ4)nI|hHwyTL;O`aprP_NRv!Xd4-6Fdt>Pe; s1I_)${*B98>&=P{ix2e;HO7C&%>iby4+9eTfT@JR)78&qol`;+0PV3K!2kdN diff --git a/src/main/java/solitaer/images/08Pik.png b/src/main/java/solitaer/images/08Pik.png deleted file mode 100644 index 65191129baf87ebdebad122c05e7a85391a935e7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 530 zcmeAS@N?(olHy`uVBq!ia0vp^oEakt!FczeW0!V>kn6_k zZ~HS$Z44|l|6Q=<(0sFE!{S4IT-I7|zOTx?@jviJ{8hO(>$BoF^k>y4`fp{w4U{;v zFXVPW?qNHig5cc4^SFMm*anp11xq0WgA)B)Ygcagzhc9E?%yjm=!<>}xxHcetu|ZH zZ%Yr&9l_mX6Ix&7#F3^GUP=i|k zI=2Fy05nLREakt!FczeW0sC5!%>Hq z|JtvqsED-QPW}_#CZ2dyL)$IV@Kje|SkI&6G!zKdt;Bi|~HZ6w$?NBvO$>WJn0TvTuvpEakt!FczeW0sC5!%>Hq z|JtwlduViROWzRQCZ2dyL)$IV@Kje|SkIM`sZ1+a+yZ39`YDfmHS5lFwHJX@-w)~oiUHjO;s(WdeVhswwof}cyGY~|&`h9A zkPX;K3lRAz`c$BX`$y@pnt*kWnm=g(UG1wW2XgY!`oMLMrmvAmMGlgrDWZ#qn9z!P Y{jL*!CjU=l0TTg(r>mdKI;Vst0NttRVE_OC diff --git a/src/main/java/solitaer/images/09Kreuz.png b/src/main/java/solitaer/images/09Kreuz.png deleted file mode 100644 index 1838a50cbb13577f5a97cd50ea8dcfbf4e3370e8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 584 zcmeAS@N?(olHy`uVBq!ia0vp^o+K)m>noz|QCoWECWTX?IjHsp3d?%_Dm zZ>zQ?{`b4F`c|9ms@xlkq0}L{t7dQJb5)1laBsEM0_v0#-4=R#LqFG5xf||V*}nxQ z%8Pzm@s0Z%R0&k8R>ku9!{4CX!*+*&ZUGv5Rc-}H9BBRGLv<^GHmm^J`g`TAw!b1Er}k$_f13`( zU`0UZ=>rvla3IhGpd<8w2ABbD1l!uW7v!u%|A3|gG01M90ri|f!Eakt!FczeBbTz92dZYl{ZJp5wbq*z8x|j`TYszVZ~vixA#V@dWdQ~ozbZ@NkSZnKV+x%#=F&4 z^xM)y^SFKoCHjNdKyC6IzgKL~2Qz^t0L21x56|PO*2-DEEpfl#w?L5o#kbnB_`ikx z76x+tTeGCU87Inv4B8h`9RL*g>)L92)o#Ol&fhD*_WsrfIbp;86(BbORZAzvugV2V z{a<>ktv2LFd?1PE|O=V7WZEakt!FcyzV3&+1!%>Hq z|JtvqshGH4Un5yB8P_7Zc#TBrQ4MXkNW)WI=1YG}EE4ti`nW{of1hall*JXneNL8L z{7Wl>y6TU2sXx`)r{P|x2}DOH2mP@Q+oO3@93Eakt!FcyzV3&+1!%>Hq z|JtVs3(Z=TUG}j?GOk5*@fwNLqZ-<7k%p(b%$NR{SS0H2^>K;F|31<9DT^zD`iw^IbZN{{@uwO?n6Ie_?vmF8x=jS=y@eo${tEakt!Fcyz;3{o)0oIMd zzvH(sF}E4+`&oA(=tf|od#kKySqP9}uk}X%s@x6l*1aJ&_6vVod#mm5ifs#Twbh2) zaNo-NyZlhxD%%bDSIyo8<{p+4{kCFT;{T8v{anAp67_++4M6pKLson{08%xbt9s=I z_pS0b+z|=_au4qdtxmYVDi^3zUi4c~V*N@W17vM9$jZgH*gOyX8hnU9;w0tR$|GUvv3&_|PdV51YSpQbu>X6$T+*@r|<=${_1v(pSHprNu z+{1M(e^+dfziI|l0dy@;4oG?fJp{x+?}EJM4RWRTR(7D9z+U+u_?G#1*xN>~YM@oM jEzt0R2h+%`2}Vqoxe^>bP0l+XkKWTW{s diff --git a/src/main/java/solitaer/images/10Pik.png b/src/main/java/solitaer/images/10Pik.png deleted file mode 100644 index fa6024a62ff2f893c71d3f995a76ac9b0fe78663..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 507 zcmeAS@N?(olHy`uVBq!ia0vp^oAt>Eakt!FczedZxkXmAEaXODqI>J#xUIau%5h>dgX@cS<>HDY)gy=s=qNiiytIc9ddhvd+Xkn8}voLRVT)4y$J?!z#{Ig zwpwoja}U=kyzy?WUA4hn^xF!E5kUFet7dP^5A6%Nv7DXa`Lmp_rTh`w*L8h;~)n>aY_r~Hw{{n#OrGd=+7NCRmubKg!FrDkSGqQDm zy|=P|TLxCj1$4MPhqcz56&n^G>f;(>jQEakt!Fcze<0>fz5!a2y z-}k==5wKgdb<5&I-fewSR#`7rEL;p^{MzDrKj-3X-Kwpw|Ic5Ty_Wsg+O_Oen_bs$ zd+}egYU@{*`P=5bI4idI)}sIEFD{GKZg$Pz_Tnm#U$rPaddpWA|LFNI-t*MnS_Bk6 zdrke<#;*?1{9lq^cm7Lw-T3d^h2^@x(z@^ETwJYNb*pN@a-i8j%Kk>xg8gP+GQ0QP zTx1^oC98YhHoJ?L#r__=#{9Q?p?~xjpoKSq=6~7p)nWfupaX3$*dx2tew!T7Eq|{8 ymG4GYp7omj?~O$eC&`+YT)7bF?9MyH82Z9T7x+zZkN*gaOa@O^KbLh*2~7Y>W#t9{ diff --git a/src/main/java/solitaer/images/11Karo.png b/src/main/java/solitaer/images/11Karo.png deleted file mode 100644 index 422760bcef3faafc7f96a63829da8cf79b035983..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 518 zcmeAS@N?(olHy`uVBq!ia0vp^oA!>Eakt!FcyzVAkUR29|^G ze#`Ir-grPlGw#v)10j)yr@8{edNw6Z5na5dBB;xM$|E<;dzwe@Z+zrt*(I;(Ubt99 z|5V@~S?zn8(;s>66fyTI4D5U4ANg^K$b5~Xy+Jak0`F+N@9GZHnEq&Pk>8BccK$B;Q`g?us47#J? z4%E?GB+?!fGv$#d$PMe^mc&e1TmiIok%;)xiXb2@gCw^{!yV+J0FbnOP@j`!SAGP{ zaeIQh#Gl3%1_Hh1{ZUoh4aK(-sYf-2n9wWvJEakt!Fcze4I)|(X@76Tc-gA(mSZUnd1uGsKj{msf-ZGV^EYO@W!5xtf7 zcl{x|km`f`fOwwP8=&yt@WgnnH|<>2t2V5?)mFPA;4SNKFiw;Q$&0_yedFEwHz3hp zbXD$+;H}~yLhoNZR?vbgthE56xSZyJ8zi zi}zN2h$Kj{$hW13>Q-!6&Q-l~TVlTGH;{9HcyGw<4g5g8-cY?-Z-6e_8*(EaXfP13 z_|~*H^!A4REww8*08Ly8^bpXEakt!Fcze<0@@VF_(=N zzvH)X3CaCA@^)c$!O{(j5A|_bYrR>q;r{AviT~Xb<+a{)b5*bY)@HlPcEj33b^34C z-fH`+f7R^G+C%?BZf|hk%6nVu&G$q90^c^)uK0G~p4JNEfV diff --git a/src/main/java/solitaer/images/12Herz.png b/src/main/java/solitaer/images/12Herz.png deleted file mode 100644 index cfda3461d174a4f960546b2ad424cfb89ca2d98a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 509 zcmeAS@N?(olHy`uVBq!ia0vp^oAr>Eakt!FcyzU{(yLh|9*{ z-|<_XIW}kB=~Vy86_fd5#lppHeNt9gK!$(xm(16)wKo@)M}K+GQ@i==g8XfAUp9SR zFkQE5yX*gR7j~}|{}mtoWs~dsZ7=Ri{@UXDKf60_+l#wmdv8}QERWvu)k!~k{)_WG zwYL_{&$WG#`dYa5X4Qpj&HHlpUf>5BmELBTdlAG)?Y@_L@$|LkIEeZ3IkqqQd4am_ z1C{RvSq3sEwYzS^*9H3xzhrjTWxjU2pK}o?1yrD)d+|L`gFZ-ue>6YP89?U%4Fj63 z5480?NIZX=-Nn;DX92wu|KhY*?X6!f^=Zg{g?oAkF#a*GGg;)9cJIhFV6-xLy85}S Ib4q9e0Q%(v)&Kwi diff --git a/src/main/java/solitaer/images/12Karo.png b/src/main/java/solitaer/images/12Karo.png deleted file mode 100644 index d9f8a0bdd01cdd01dc5d68843dd77cec9c97dcb0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 525 zcmeAS@N?(olHy`uVBq!ia0vp^oEakt!FcyzU{;JH!x4v< z|JuXY*ruhwfZ4>!(`(JT>)}0>yrWhS_KywbwklRHPlGt{liX6}l&Q-J|w36+vC^HQfs} zTZ=^Q2X}ez?BYKasNw!m7^K5|%HoQ^xGsH7{i91|jqv*GKbHfqR1c zoGd}AWxNVCk4_HS6WsMb4M^8`0!4vB?jIM)0PUF`WCJqZ{o{R*Rq9VQ=7AmPZQ12) z+2yUdZ;1@hX8S~t#(;T10ibufKdl4$B7e&2ABsSa8lLJ34C_Jh`%n^k#UGxs&Mz`t ROBoo=44$rjF6*2UngFMY+-?8> diff --git a/src/main/java/solitaer/images/12Kreuz.png b/src/main/java/solitaer/images/12Kreuz.png deleted file mode 100644 index a6356c803084f9df3f5493fccfcf48710b0db892..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 552 zcmeAS@N?(olHy`uVBq!ia0vp^oEakt!FcyzAeS_!nCr&s zZ~HTNMI>^xX8z-`(R{OF!{S4IT-I7Z#&oXgmETx@uh^h3`t5zo-&NZZ_pi#mvG`V- zt=1bL`PVuzewFQp|3QiUT-71BH`HsrS$gQ7cdM;d&gyN6@me9(2_Si(=B0<^uEuTX z2O9VrY=YBP-ru2b8-XS+ywz44aswznIZOJR;J2W}`taPtcB^U=KG!Z)Mkd6Zn?(HwQRC;2|?~ b82=e_eRyJv1X>;eQvidftDnm{r-UW|1-uLh diff --git a/src/main/java/solitaer/images/12Pik.png b/src/main/java/solitaer/images/12Pik.png deleted file mode 100644 index c57f94c6e7833bc0a408773c8590a376378402f3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 494 zcmeAS@N?(olHy`uVBq!ia0vp^oEakt!FczeV-^d$n9ISM z@Af4;A|@VJPQ+~$w^w?zV#DG?eO%UBZ+@@Jy-~06X6d20Reu|5Lw@sChg2s-x7Nnr z$iHg#W_y|QciSR=_Z!}=dx2upxqd?|0%}zNYOP!S rtqEu^NZkgYOPgR`gZpuaFn-Ca3EcGC)fJHrj7J7fS3j3^P6B| diff --git a/src/main/java/solitaer/images/13Herz.png b/src/main/java/solitaer/images/13Herz.png deleted file mode 100644 index 5362efaa30e3fb203258bf8480fa91f838b12f9f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 511 zcmeAS@N?(olHy`uVBq!ia0vp^oAv>Eakt!FcyzU{(yLh|9*{ z-|<_PJ#5UpBzgQNS4`%M6$=-)^+{P}0U7?$Uov0I*4|uH9{uG#&)=lit#uo}I`yv= zugbZ&TlZIa+r3=d7ya8_Y;=9U?Zth`Ut3)7->zDCTx{=cpbq}3?XEx~r*_eNkj($| z*N*Yq>@H4UD}JkLp?);~uVdG^|DL(9T=&<#YuvWmUfdP4-4^!(Vm?^z21stPF4!)R zF~`MflV7*~JBA{>_d}7VbCslG%;oyiH%7=5Kqk9cbu#-r8G>{G;E$I1O=H vJdja)>z9kYamkenfzIx{vZh0f@t?7A$r8W5*LRG85zFA|>gTe~DWM4f3ykYk diff --git a/src/main/java/solitaer/images/13Karo.png b/src/main/java/solitaer/images/13Karo.png deleted file mode 100644 index 7945855e66a25d9492ab292f4be330f9849bfef0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 527 zcmeAS@N?(olHy`uVBq!ia0vp^oEakt!FcyzU{;JH!x4v< z|JuXY*ruh%CmoM(Tem4`is<4s5~)WuwA~^9bbE)tQSvUmpw zJ#w||x}SX1`l;5wr6SXVVonAA(bAqbP~d2Fa06@ zR4Z&7(_WjCrryJ?~mc9ybCpf`YgM=ExZ1w9i1FhEakt!FcyzV3!Q10P9Ba z@Ag~7xTLC9eEfBJLeP!CME6!%(XtRALtpe;&|B_rfr;^2Z|-ycUU{qSZ%FQ8xvOSx z0u$wdBv35qZR20xR$Hw%fw_nOt=ur3>vud@I(jSb@1TXZm_Z6^S8f2BwBlP+ZOh(} z8}cF53G$+=a&P!wl>=h4klP#jxqb&F?q9hrQ66OFexTgqTkPM0fkptWv;}bw?F+f# z4de@b3regHPVCQ;28vGSs$Ti6323)>E681SK<t~eg0#4|?gg5BABf#SPRTtS zcPLKl&GIbiZ!5MX0xg7)zCbx32D${K%J+shP}lFK+7OW0AgBI5P`B!v1JJ;|3G#?= gfd|l#V0@L={=y$y_hZHvU>acXboFyt=akR{0P2hLRsaA1 diff --git a/src/main/java/solitaer/images/13Pik.png b/src/main/java/solitaer/images/13Pik.png deleted file mode 100644 index 605141a81cf00f03aa591e7dc1c2ac5a34fc5f25..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 495 zcmeAS@N?(olHy`uVBq!ia0vp^oEakt!FczeV^%V!i0j7c zZ~HS$YYdLe2yuINaPpx(E^DnfD>f`Xv~T^bw!i&{>_Tp|XW1v{U%i*upT(cEdc%9} z>hRpd_d;)PaNo*X9dg4PMBd)8_Rv24H|<&cZ}dgKt=J&1^~SliHvUFC*YD+7(hz~b z#C|T2N_~#s0g3xpd^-@Q^=9dmK|sYoW;V$F zc#w+yD}eTiqYLl?)mVen>;~Dg4XEk2Yb(ga+{616Ku%ckjTvYbNOSAnkQ?GHvZ7@n iHv$vgTZb0oO8t|Scl@5-{wfQMNCr<=KbLh*2~7Y(*wmH) diff --git a/src/main/java/solitaer/images/back.png b/src/main/java/solitaer/images/back.png deleted file mode 100644 index 9457b3025989f05a6724f9688f0e4b4007b5030b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1361 zcmV-X1+MyuP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!vFvd!vV){sAK>D1m;OZK~#8N?V7DZ zD?1Q?E0M@bB#(eZRw8+X%1RuPN2o;d2uLIn$s-_+9>))fLA0 z$9B8L%K^{N&*aY7f4|@3wF7LNEJRG&Wdd~rvCGR#jFH?PvS@f7UI+krAC0|1Lnx+6 zmuKWg#1h*RE*fC(B=Y(-g_y;Fkz3dpiQ*v@B0WzTEkTVKaC8d;>BXcw!`u32%z6(^n-mZD)2z~B}pt#ZZT$`Yf9<@@`4x7*=| z50pkAtistS)sJ$;y6gFLCx)_#Knea66Tc`teAO9q^P31fULNVA{2#6Qz z040db=E^UUo&gSh6Q-GHa*zsl#PO+{RJf&LBu*1CX>IUBwj9JWz*AX=K)o2-RFaYh z-B>Y05yo3<*ct*`fts-B_Vo0GAF5bQ!*ofbq9`UmOG;^*E;dow3XG|BiyO5vUD9D? zh-r6=a|PHI!G z<*Kv@rLo>HQ3TPgl@idQ{8*@4+m|n()nR3Ty0yv`5YNCqN*?OgHX{4CKU zO^YdJU>Y12__u0K*jEl_XYon}abE#FtuRY5c-=%C^u&n@fMH>DV{_H5ucSngoh^2A zyG2^7Pr4)}fF0>&Zt=kAkgG)PrT0|j#%|cuxyrUvc26^IY+p@kRj=d`-J};w^UF$_ zw32N%c{d2up|8?DfKACm-QsjrJ|JdlCC||f!o|-s{9}PcHzm*D#kDcYUq3h z8W^@57pq{-KFml9|HF;tgg&<8RQLVZYx)%e6A8S!*fO4aUaX+Z&{1v)No+T;Ph-tk>)9b_)?O+({YSzP`R*US6P2 zZfI%~G`T2==Efe&)y}f;Sc!2jW zn1Og@`7}P?X2qY|GWm0x4P~!;?lbNiD&S6J^B2~6;oQ!_B*wXAzoE_tUtC#^{TAyr z{Ez&Tu&`ND#Gl(T8M&Rw==Y%3K`j17lVyWuXL-b-S#Sm{ee`?&H?!od`2GD4F1)}x Tv1aIi00000NkvXXu0mjfOWB0! diff --git a/src/main/java/solitaer/images/empty.png b/src/main/java/solitaer/images/empty.png deleted file mode 100644 index f6c6284bb9bb498d64b9fdd3529d47fa7773de0a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7063 zcmeHMc{tQv`=3g(L<%LT##pkAF@qVVL3SgPJ$ss!2{U76tZ8|K$gbU*ElUrwWlK>) zB&86_lBX0Z9$N_Scckt2zSr-%p6hzw|C+hZnS1W#bI$!a_c`-D*F;zxG8W(y=L3O2 z0$39RE8r6gG(69GpcnnP>j?~=lH zJ2buCE4iY+H+1>^wKGxd*Ow<@v-IM3%e7G$r^L#;f;A~h3Ci;5{K>ohwD}PqZ($X| z_{WcQ<6J93*l9x3vI9Ci3B%XKE%&!4UAxI^#gq=m9gsK%Mf&^MNM7`Qc~a-mfm80T zy#qv@rMpsNWc@dC@{!w)rPK4KK^7m(^$gKlr=b@wet6VTbvX4-bfPpV&d%3S(8hnd zrTX@4%ZKrL`IeZmYy5MKWfjA%WA`x516&zNpDjup=`sT@TPzD>M<3mFEHy45yYDEM zIp2%R%QMx=`UG*#y0P5EUtc$=`{Ul%eL*eH-Mq0UmqUI8&s0Z5s^0A zJlE=>P2bqr>#5lA`fN(q+r5%bnc%3mRkOINX331lfu!m`Mn)!Gr*1&DB+@A6e2p>! zTOWoO(8>d|sxw8&YHSHFT;*+Eu&`xM*wGNk7Nx^-QgRdx`4l0NvH5a@bhCA4e1tPN zD*mcm_TlG_$XVkL%%6geT*Kt&95BzrX1BDIHDCa0dKx0r;&K{48L}Wkd&x6mYL;h z+#*Cwz{;eUl{}P5(>teVn`T=?DZk;Q)pfH`skB98UrC$tq6AYZ!@^df`U)XZ@lMD# zMceZH{KD(KqxnVYjY-{Hfu+LcY3;SL*Skq`Hm&byM>5mUD8umWhs>sS2ACbw-Q(A` z!6uzN)$=;EYg?O7o7=&-=L%8Mrq7bk8%~J@SnQC*iJ}HRq}ELBDx=Kf4z;IOedObG z(Icr#v-dnSXTx%zXgyEFtBz*m&RbrW(+b#cn`R^0bye@u4eiEpc1sB$pRdhu|}4TVPgQZ9-fX_3y$+m#g6-t)Ok!|QN- zcZq_63;9@({3c%Uiw)wp^P?k8`8#S}1eD}x=(RaXW7p|gX4*w6ItWFo@f-fpRricA zo!evC(`Asvm*7~*lNDTseEPKWK)R;MdynjQZ(0aR%Od%FyFH3sa37?$s_hb$G@Z$A z?NksMXm^G$i5X13g7s!+m;@a;mpLSe)mSP5SU4hHxpuDWqB&4g}Iy)c-JdG zjTXzcE#%bB&> zOGS@3KI)fRiCT1eo-?rm`S@&tW^fYS2RXH6F-tuAQm2i0w(py=99qO*PwIkh78)!Z z7d+Rad01yWBbwzQJiak{C2+gP(kIPaCxyY%sNg!cog4pXF9~(jZk6K+x@0NzSt%1d z;b5fu!-(KppGLlRx*cHwIBWjjHc^+6OGJ0>9<0*Q=w9nFeR77?_Zi3-rR&nK9J)e} z=7O+GZ!Tekk6RTPLw%^Va+yx+V~I@%Dl?8tZ=TTbU2C&?b;B>MsV;SmuFm698YbGNRqmcMl zXg}}u?6_iHM}D_1ZWpUPPuTj;t&H2tWl*8VxlIq{`R&}4J()WL+dgL0(^9#i&LMc; zT$+qO7a$melK)L$D87CM4t5f#D+m_`y*#I}?iXS3?ylItxH}Kt?XlAro`#q_i#@gF z*;zT<{Y3P=X`Y2o_olaJMa+v`|0L36$yzx-u+0Ug7w1j*yLv{6s80IA7mrLUO>b;Jq7d<*_9Zc$ex*M*(rzKu za!1j$R;Kci_s5M~f=2rXoxP<#zWE`8abm4SL8s+o3%0Sn=@sO8xe&kg7ymk;F z#Z+~#6`|p*?mDt6Vs*fuKgFc8{q1e+~{!x34%81LuwH?duaLjR~ znXKj89W(MGBMX?%CH_ObW}lZaQ*kk8H%Fd3xOCw)&pN>e@ZA#Uq_{LhjCmMxF`=jR zy+c4}U)%GnDTD?szEB}6k7N;cMtM479G@D?F@SFr4A4=bCIkx9`ewlLSg?FuCYb4rdQU0`(8$!o<{yecc?h>ZBKSe(8+ctH}q;}{1&XX{veRg4BQ+IdXoWoV;$f^RHPyDa?5I$SqB4(aiRudXo zy){0g#0ST{fmS+m>(G)G?o7R?T6zUuNJNy~}y%DSdM zsq2DY_iua}v3hegv9 z1uLa>K4wqe6?t(ojUI$DXsDQq{uCDed1$C3NPm8oo0SH8b=~<>KYmYpcWPXGFs=zD==IO`#@&%IvYjxlm`FzxK=d(foboO~vGzl7VL&W4Y%3cET>9E&?@V|B;- zP`7a7ZyN&}P`BiteLp{ZOF*1Vsdt4=A{3X2o zyJnL$ZmafJyq+k9Y412|?z|YG5p=}*mzDLF&nWRMY+}cNlsE{q zE{v+LZ-Ld<|Mo}^Jjf@Xh}SZ?Zy^$DZfzKEx@o_Oce6#xpW)}i&)XF9Y&UgEx7~F9 z^0MyvFzE*mEE!OZ&!zT04DYVadRrl`QwJncl0{sy8Wt1uBE?{s{-%IAiT;``LgJ#= z6J3T+=Q|iF>=7=lvMnAF)ehO(AV!g)j7CfoxKn3*%wO5~S*E^uHRm>?7;t`_cD#Sg z`!K`Xx|mw(`{cO@{XeDU8%7#3xn1Hu$B&h?(vu?v`7x>_lGRj$B%%04J#$lOLi#rI zt;Qm@nL(0cCHDd%OC9ryyR_!{Hw1XewD~ydhZA{ur6u)@1jsf=B~5FL&P9l%G-1Br zo6@8&n-wC&G`CxX@;#h9vr_-5Co%LPFG^l$L$#~tB2nyJ&&EWbzGdxOAKvl~p5iVn zyLGo0MA60;Rg^bx6?)07T-cX*dz14=&>8b;l1a>8IWi)Ab&ESsSPP0(Zd~YkSylen zdjUjpKirC{tCv)<${P2H^_%m3{9z!q>&r>dVgs{ZQYn~o`4Xc7mn?gn8JbAKo}i=2A=3aW`hZ2H!4jF@~P%71WYAqLG09VDmaEd*_~<<$Rt|_9e{$m8o2Dq!jtjH|750gkX^d-~SQa?kGh~MKGK1|Qm zbVx)P*^}%AxUzsz;lB)NjKx`ekKjMge61;>o5`evtLc+&Gribbg))5dIza z7w>PmuQ~%>I2_u5PW0hS4{M+W;f#+a(TP+NdR0_K5fKEq1`>)=Q%6A6P$U9W1CJs= z$?9+-f<#s&tK(5WL1AeuHl9W#bD#ilWh#I}rl_c*Ch8tQG{Jtnx!+;fZHcfB;|*P-!H( zAM1z7hU!JOX5%@0!jWpK2si?+ss=Eks-p43=`fke0&0=8yoJoN>k*fs`#(Z5C6DkYv2;kKGTGd;Vy}y3@x(Pg~ zt0pjbwQ$jR;@3e~cwaJUbs!+_tBL52r@4`V9llml-}Kb~v|LCsu;ta&pz5l?va68^ z1gIuKlK>@=Nfcn|kz@oy{a17rox=9RGs(JcK&C)8Knbm81D0DOQ~pRDHULU ztH7ZMqzxR2R?|SMt3hCE$-+2$`dhXb*uU|CS#|j75CG!7>VU%qIICda534o4I28U5 zUu)~|KO6yo{yoS);`cXQzv=o%4E!VK-_`Y-u7AY9KXU$EUH>(@_$TZ*y$Pc*8 zd?+5m0~aA~!a-vL&KVKCeT*;)~F)2XG9V^ zr#&)5P^fn__+JpCtStZl From 462b2e0a5f912868170a9b19781aba1d9247cb3c Mon Sep 17 00:00:00 2001 From: Alexander Hartung Date: Tue, 15 Feb 2022 20:38:16 +0100 Subject: [PATCH 54/54] Refactor --- src/main/java/solitaer/Card.java | 12 ++++++------ src/test/java/solitaer/AblageStackTest.java | 4 ++-- src/test/java/solitaer/CardDeckTest.java | 4 ++-- src/test/java/solitaer/StartStackTest.java | 4 ++-- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/main/java/solitaer/Card.java b/src/main/java/solitaer/Card.java index 5cad36d..e905f90 100644 --- a/src/main/java/solitaer/Card.java +++ b/src/main/java/solitaer/Card.java @@ -21,19 +21,19 @@ public class Card extends JPanel { private final int IMAGE_WIDTH = 72; private final int IMAGE_HIGHT = 96; - public Card(int nr, Symbol symbol, boolean faceUp) { + public Card(int _nr, Symbol _symbol, boolean _faceUp) { this.setSize(IMAGE_WIDTH,IMAGE_HIGHT); - this.nr = nr; - this.symbol = symbol; - this.faceUp = faceUp; + this.nr = _nr; + this.symbol = _symbol; + this.faceUp = _faceUp; } public boolean isFaceUp() { return faceUp; } - public void setFaceUp(boolean faceUp) { - this.faceUp = faceUp; + public void setFaceUp(boolean _faceUp) { + this.faceUp = _faceUp; } public int getNr() { diff --git a/src/test/java/solitaer/AblageStackTest.java b/src/test/java/solitaer/AblageStackTest.java index 6059ac1..94ebe9d 100644 --- a/src/test/java/solitaer/AblageStackTest.java +++ b/src/test/java/solitaer/AblageStackTest.java @@ -12,9 +12,9 @@ class AblageStackTest { @ParameterizedTest @MethodSource("testAblageStackTestDaten") - void testRulesetAblageStack(String msg, Card _stapel, Card _spieler, boolean _expectedResult) { + void testRulesetAblageStack(String _msg, Card _stapel, Card _spieler, boolean _expectedResult) { AblageStack stack = new AblageStack(0, 0, Symbol.Kreuz); - assertEquals(_expectedResult, stack.cardCheck(_stapel, _spieler), msg); + assertEquals(_expectedResult, stack.cardCheck(_stapel, _spieler), _msg); } private static Stream testAblageStackTestDaten(){ diff --git a/src/test/java/solitaer/CardDeckTest.java b/src/test/java/solitaer/CardDeckTest.java index 48776f9..0576f3c 100644 --- a/src/test/java/solitaer/CardDeckTest.java +++ b/src/test/java/solitaer/CardDeckTest.java @@ -25,7 +25,7 @@ class CardDeckTest { @ParameterizedTest @MethodSource("testSymbole") //Jedes Symbol muss einmal vorhand sein - void testCardDeckSymbole(String msg, Symbol _sym) { + void testCardDeckSymbole(String _msg, Symbol _sym) { boolean result = false; @@ -36,7 +36,7 @@ class CardDeckTest { } } - assertTrue(result, msg); + assertTrue(result, _msg); } diff --git a/src/test/java/solitaer/StartStackTest.java b/src/test/java/solitaer/StartStackTest.java index d033e45..a618a19 100644 --- a/src/test/java/solitaer/StartStackTest.java +++ b/src/test/java/solitaer/StartStackTest.java @@ -13,9 +13,9 @@ class StartStackTest { @ParameterizedTest @MethodSource("testStartStackTestDaten") //Jedes Symbol muss einmal vorhand sein - void testRulesetStartStack(String msg, Card _stapel, Card _spieler, boolean _expectedResult) { + void testRulesetStartStack(String _msg, Card _stapel, Card _spieler, boolean _expectedResult) { StartStack stack = new StartStack(10, 10); - assertEquals(_expectedResult, stack.cardCheck(_stapel, _spieler), msg); + assertEquals(_expectedResult, stack.cardCheck(_stapel, _spieler), _msg); }