From d629613db49ca4531ac4e5249ea380e0ddbb652c Mon Sep 17 00:00:00 2001 From: Alexander Hartung Date: Wed, 26 Jan 2022 15:31:53 +0100 Subject: [PATCH 1/7] 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|==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ep 17 00:00:00 2001 From: Alexander Hartung Date: Wed, 26 Jan 2022 16:32:36 +0100 Subject: [PATCH 2/7] 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)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KWTW{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 3/7] 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 4/7] 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%3mRkOINX331lf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sf=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 5/7] 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 6/7] 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 7/7] 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); } }