diff --git a/src/main/java/de/hsfulda/onses/models/Game.java b/src/main/java/de/hsfulda/onses/models/Game.java index be6f1e1..e5066bc 100644 --- a/src/main/java/de/hsfulda/onses/models/Game.java +++ b/src/main/java/de/hsfulda/onses/models/Game.java @@ -19,4 +19,9 @@ public class Game { public ArrayList getDrawCardDeck() { return drawCardDeck; } + + public void addCardToDrawCardDeck(Card card) { + drawCardDeck.add(card); + } + } diff --git a/src/test/java/de/hsfulda/onses/GameTest.java b/src/test/java/de/hsfulda/onses/GameTest.java index 3ca4fd3..dc55137 100644 --- a/src/test/java/de/hsfulda/onses/GameTest.java +++ b/src/test/java/de/hsfulda/onses/GameTest.java @@ -16,6 +16,18 @@ public class GameTest { game.setLastPlayedCard(card); - assertEquals(card, answer); + assertEquals(game.getLastPlayedCard(), answer); + } + + @Test + @DisplayName("GetDrawCardDeck") + public void GetDrawCardDeck() { + Game game = new Game(); + Card card = new Card().setColor(Card.Color.RED).setValue(Card.Value.EIGHT); + Card answer = card; + + game.addCardToDrawCardDeck(card); + + assertEquals(game.getDrawCardDeck().getFirst(), answer); } }