Browse Source

Merge commit '462b2e0a5f912868170a9b19781aba1d9247cb3c' into HEAD

solitaer_Game
Jenkins 3 years ago
parent
commit
e3215fc44c
  1. 12
      src/main/java/solitaer/Card.java
  2. 5
      src/main/java/solitaer/MyMouseListener.java
  3. BIN
      src/main/java/solitaer/images/01Herz.png
  4. BIN
      src/main/java/solitaer/images/01Karo.png
  5. BIN
      src/main/java/solitaer/images/01Kreuz.png
  6. BIN
      src/main/java/solitaer/images/01Pik.png
  7. BIN
      src/main/java/solitaer/images/02Herz.png
  8. BIN
      src/main/java/solitaer/images/02Karo.png
  9. BIN
      src/main/java/solitaer/images/02Kreuz.png
  10. BIN
      src/main/java/solitaer/images/02Pik.png
  11. BIN
      src/main/java/solitaer/images/03Herz.png
  12. BIN
      src/main/java/solitaer/images/03Karo.png
  13. BIN
      src/main/java/solitaer/images/03Kreuz.png
  14. BIN
      src/main/java/solitaer/images/03Pik.png
  15. BIN
      src/main/java/solitaer/images/04Herz.png
  16. BIN
      src/main/java/solitaer/images/04Karo.png
  17. BIN
      src/main/java/solitaer/images/04Kreuz.png
  18. BIN
      src/main/java/solitaer/images/04Pik.png
  19. BIN
      src/main/java/solitaer/images/05Herz.png
  20. BIN
      src/main/java/solitaer/images/05Karo.png
  21. BIN
      src/main/java/solitaer/images/05Kreuz.png
  22. BIN
      src/main/java/solitaer/images/05Pik.png
  23. BIN
      src/main/java/solitaer/images/06Herz.png
  24. BIN
      src/main/java/solitaer/images/06Karo.png
  25. BIN
      src/main/java/solitaer/images/06Kreuz.png
  26. BIN
      src/main/java/solitaer/images/06Pik.png
  27. BIN
      src/main/java/solitaer/images/07Herz.png
  28. BIN
      src/main/java/solitaer/images/07Karo.png
  29. BIN
      src/main/java/solitaer/images/07Kreuz.png
  30. BIN
      src/main/java/solitaer/images/07Pik.png
  31. BIN
      src/main/java/solitaer/images/08Herz.png
  32. BIN
      src/main/java/solitaer/images/08Karo.png
  33. BIN
      src/main/java/solitaer/images/08Kreuz.png
  34. BIN
      src/main/java/solitaer/images/08Pik.png
  35. BIN
      src/main/java/solitaer/images/09Herz.png
  36. BIN
      src/main/java/solitaer/images/09Karo.png
  37. BIN
      src/main/java/solitaer/images/09Kreuz.png
  38. BIN
      src/main/java/solitaer/images/09Pik.png
  39. BIN
      src/main/java/solitaer/images/10Herz.png
  40. BIN
      src/main/java/solitaer/images/10Karo.png
  41. BIN
      src/main/java/solitaer/images/10Kreuz.png
  42. BIN
      src/main/java/solitaer/images/10Pik.png
  43. BIN
      src/main/java/solitaer/images/11Herz.png
  44. BIN
      src/main/java/solitaer/images/11Karo.png
  45. BIN
      src/main/java/solitaer/images/11Kreuz.png
  46. BIN
      src/main/java/solitaer/images/11Pik.png
  47. BIN
      src/main/java/solitaer/images/12Herz.png
  48. BIN
      src/main/java/solitaer/images/12Karo.png
  49. BIN
      src/main/java/solitaer/images/12Kreuz.png
  50. BIN
      src/main/java/solitaer/images/12Pik.png
  51. BIN
      src/main/java/solitaer/images/13Herz.png
  52. BIN
      src/main/java/solitaer/images/13Karo.png
  53. BIN
      src/main/java/solitaer/images/13Kreuz.png
  54. BIN
      src/main/java/solitaer/images/13Pik.png
  55. BIN
      src/main/java/solitaer/images/back.png
  56. BIN
      src/main/java/solitaer/images/empty.png
  57. 4
      src/test/java/solitaer/AblageStackTest.java
  58. 4
      src/test/java/solitaer/CardDeckTest.java
  59. 4
      src/test/java/solitaer/StartStackTest.java

12
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_WIDTH = 72;
private final int IMAGE_HIGHT = 96; 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.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() { public boolean isFaceUp() {
return faceUp; return faceUp;
} }
public void setFaceUp(boolean faceUp) {
this.faceUp = faceUp;
public void setFaceUp(boolean _faceUp) {
this.faceUp = _faceUp;
} }
public int getNr() { public int getNr() {

5
src/main/java/solitaer/MyMouseListener.java

@ -118,6 +118,11 @@ public class MyMouseListener implements MouseInputListener {
} else { } else {
tempStack = (GeberStack) com.getParent(); tempStack = (GeberStack) com.getParent();
} }
if(this.saveStack.stackIsEmpty() == false) {
clearSaveStack(selectedStack);
}
if (tempStack.stackIsEmpty()) { if (tempStack.stackIsEmpty()) {
// Move all from Waste to Geber // Move all from Waste to Geber
((GeberStack) this.tempStack).swapWasteGeber(); ((GeberStack) this.tempStack).swapWasteGeber();

BIN
src/main/java/solitaer/images/01Herz.png

Before

Width: 73  |  Height: 97  |  Size: 523 B

BIN
src/main/java/solitaer/images/01Karo.png

Before

Width: 73  |  Height: 97  |  Size: 539 B

BIN
src/main/java/solitaer/images/01Kreuz.png

Before

Width: 73  |  Height: 97  |  Size: 564 B

BIN
src/main/java/solitaer/images/01Pik.png

Before

Width: 73  |  Height: 97  |  Size: 506 B

BIN
src/main/java/solitaer/images/02Herz.png

Before

Width: 73  |  Height: 97  |  Size: 530 B

BIN
src/main/java/solitaer/images/02Karo.png

Before

Width: 73  |  Height: 97  |  Size: 546 B

BIN
src/main/java/solitaer/images/02Kreuz.png

Before

Width: 73  |  Height: 97  |  Size: 574 B

BIN
src/main/java/solitaer/images/02Pik.png

Before

Width: 73  |  Height: 97  |  Size: 517 B

BIN
src/main/java/solitaer/images/03Herz.png

Before

Width: 73  |  Height: 97  |  Size: 532 B

BIN
src/main/java/solitaer/images/03Karo.png

Before

Width: 73  |  Height: 97  |  Size: 547 B

BIN
src/main/java/solitaer/images/03Kreuz.png

Before

Width: 73  |  Height: 97  |  Size: 576 B

BIN
src/main/java/solitaer/images/03Pik.png

Before

Width: 73  |  Height: 97  |  Size: 518 B

BIN
src/main/java/solitaer/images/04Herz.png

Before

Width: 73  |  Height: 97  |  Size: 530 B

BIN
src/main/java/solitaer/images/04Karo.png

Before

Width: 73  |  Height: 97  |  Size: 547 B

BIN
src/main/java/solitaer/images/04Kreuz.png

Before

Width: 73  |  Height: 97  |  Size: 574 B

BIN
src/main/java/solitaer/images/04Pik.png

Before

Width: 73  |  Height: 97  |  Size: 516 B

BIN
src/main/java/solitaer/images/05Herz.png

Before

Width: 73  |  Height: 97  |  Size: 531 B

BIN
src/main/java/solitaer/images/05Karo.png

Before

Width: 73  |  Height: 97  |  Size: 548 B

BIN
src/main/java/solitaer/images/05Kreuz.png

Before

Width: 73  |  Height: 97  |  Size: 575 B

BIN
src/main/java/solitaer/images/05Pik.png

Before

Width: 73  |  Height: 97  |  Size: 519 B

BIN
src/main/java/solitaer/images/06Herz.png

Before

Width: 73  |  Height: 97  |  Size: 540 B

BIN
src/main/java/solitaer/images/06Karo.png

Before

Width: 73  |  Height: 97  |  Size: 555 B

BIN
src/main/java/solitaer/images/06Kreuz.png

Before

Width: 73  |  Height: 97  |  Size: 584 B

BIN
src/main/java/solitaer/images/06Pik.png

Before

Width: 73  |  Height: 97  |  Size: 527 B

BIN
src/main/java/solitaer/images/07Herz.png

Before

Width: 73  |  Height: 97  |  Size: 525 B

BIN
src/main/java/solitaer/images/07Karo.png

Before

Width: 73  |  Height: 97  |  Size: 542 B

BIN
src/main/java/solitaer/images/07Kreuz.png

Before

Width: 73  |  Height: 97  |  Size: 567 B

BIN
src/main/java/solitaer/images/07Pik.png

Before

Width: 73  |  Height: 97  |  Size: 510 B

BIN
src/main/java/solitaer/images/08Herz.png

Before

Width: 73  |  Height: 97  |  Size: 543 B

BIN
src/main/java/solitaer/images/08Karo.png

Before

Width: 73  |  Height: 97  |  Size: 557 B

BIN
src/main/java/solitaer/images/08Kreuz.png

Before

Width: 73  |  Height: 97  |  Size: 588 B

BIN
src/main/java/solitaer/images/08Pik.png

Before

Width: 73  |  Height: 97  |  Size: 530 B

BIN
src/main/java/solitaer/images/09Herz.png

Before

Width: 73  |  Height: 97  |  Size: 540 B

BIN
src/main/java/solitaer/images/09Karo.png

Before

Width: 73  |  Height: 97  |  Size: 555 B

BIN
src/main/java/solitaer/images/09Kreuz.png

Before

Width: 73  |  Height: 97  |  Size: 584 B

BIN
src/main/java/solitaer/images/09Pik.png

Before

Width: 73  |  Height: 97  |  Size: 527 B

BIN
src/main/java/solitaer/images/10Herz.png

Before

Width: 73  |  Height: 97  |  Size: 523 B

BIN
src/main/java/solitaer/images/10Karo.png

Before

Width: 73  |  Height: 97  |  Size: 539 B

BIN
src/main/java/solitaer/images/10Kreuz.png

Before

Width: 73  |  Height: 97  |  Size: 563 B

BIN
src/main/java/solitaer/images/10Pik.png

Before

Width: 73  |  Height: 97  |  Size: 507 B

BIN
src/main/java/solitaer/images/11Herz.png

Before

Width: 73  |  Height: 97  |  Size: 499 B

BIN
src/main/java/solitaer/images/11Karo.png

Before

Width: 73  |  Height: 97  |  Size: 518 B

BIN
src/main/java/solitaer/images/11Kreuz.png

Before

Width: 73  |  Height: 97  |  Size: 540 B

BIN
src/main/java/solitaer/images/11Pik.png

Before

Width: 73  |  Height: 97  |  Size: 483 B

BIN
src/main/java/solitaer/images/12Herz.png

Before

Width: 73  |  Height: 97  |  Size: 509 B

BIN
src/main/java/solitaer/images/12Karo.png

Before

Width: 73  |  Height: 97  |  Size: 525 B

BIN
src/main/java/solitaer/images/12Kreuz.png

Before

Width: 73  |  Height: 97  |  Size: 552 B

BIN
src/main/java/solitaer/images/12Pik.png

Before

Width: 73  |  Height: 97  |  Size: 494 B

BIN
src/main/java/solitaer/images/13Herz.png

Before

Width: 73  |  Height: 97  |  Size: 511 B

BIN
src/main/java/solitaer/images/13Karo.png

Before

Width: 73  |  Height: 97  |  Size: 527 B

BIN
src/main/java/solitaer/images/13Kreuz.png

Before

Width: 73  |  Height: 97  |  Size: 554 B

BIN
src/main/java/solitaer/images/13Pik.png

Before

Width: 73  |  Height: 97  |  Size: 495 B

BIN
src/main/java/solitaer/images/back.png

Before

Width: 73  |  Height: 97  |  Size: 1.3 KiB

BIN
src/main/java/solitaer/images/empty.png

Before

Width: 73  |  Height: 97  |  Size: 6.9 KiB

4
src/test/java/solitaer/AblageStackTest.java

@ -12,9 +12,9 @@ class AblageStackTest {
@ParameterizedTest @ParameterizedTest
@MethodSource("testAblageStackTestDaten") @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); 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<Arguments> testAblageStackTestDaten(){ private static Stream<Arguments> testAblageStackTestDaten(){

4
src/test/java/solitaer/CardDeckTest.java

@ -25,7 +25,7 @@ class CardDeckTest {
@ParameterizedTest @ParameterizedTest
@MethodSource("testSymbole") @MethodSource("testSymbole")
//Jedes Symbol muss einmal vorhand sein //Jedes Symbol muss einmal vorhand sein
void testCardDeckSymbole(String msg, Symbol _sym) {
void testCardDeckSymbole(String _msg, Symbol _sym) {
boolean result = false; boolean result = false;
@ -36,7 +36,7 @@ class CardDeckTest {
} }
} }
assertTrue(result, msg);
assertTrue(result, _msg);
} }

4
src/test/java/solitaer/StartStackTest.java

@ -13,9 +13,9 @@ class StartStackTest {
@ParameterizedTest @ParameterizedTest
@MethodSource("testStartStackTestDaten") @MethodSource("testStartStackTestDaten")
//Jedes Symbol muss einmal vorhand sein //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); StartStack stack = new StartStack(10, 10);
assertEquals(_expectedResult, stack.cardCheck(_stapel, _spieler), msg);
assertEquals(_expectedResult, stack.cardCheck(_stapel, _spieler), _msg);
} }

Loading…
Cancel
Save