diff --git a/src/main/java/de/hsfulda/onses/services/GameService.java b/src/main/java/de/hsfulda/onses/services/GameService.java index 3ca661d..fe77037 100644 --- a/src/main/java/de/hsfulda/onses/services/GameService.java +++ b/src/main/java/de/hsfulda/onses/services/GameService.java @@ -76,7 +76,7 @@ public class GameService { } } - public boolean legalMove(Player player, Card card) + public boolean legalMove(Card card) { boolean legalMoveFound = false; Card lastCard = game.getLastPlayedCard(); diff --git a/src/test/java/de/hsfulda/onses/GameServiceTest.java b/src/test/java/de/hsfulda/onses/GameServiceTest.java index f6a6eef..cf6cf3b 100644 --- a/src/test/java/de/hsfulda/onses/GameServiceTest.java +++ b/src/test/java/de/hsfulda/onses/GameServiceTest.java @@ -46,7 +46,7 @@ public class GameServiceTest { GameService gameService = new GameService(); gameService.getGame().setLastPlayedCard(new Card().setColor(Card.Color.RED).setValue(Card.Value.FIVE)); - boolean answer = gameService.legalMove(new Player(), input); + boolean answer = gameService.legalMove(input); // assert assertEquals(expected, answer); } @@ -60,7 +60,7 @@ public class GameServiceTest { GameService gameService = new GameService(); gameService.getGame().setLastPlayedCard(new Card().setColor(Card.Color.BLUE).setValue(Card.Value.ONE)); - boolean answer = gameService.legalMove(new Player(), input); + boolean answer = gameService.legalMove(input); // assert assertEquals(expected, answer); } @@ -86,7 +86,7 @@ public class GameServiceTest { GameService gameService = new GameService(); gameService.getGame().setLastPlayedCard(new Card().setColor(Card.Color.YELLOW).setValue(Card.Value.ONE)); - boolean answer = gameService.legalMove(new Player(), input); + boolean answer = gameService.legalMove(input); // assert assertEquals(expected, answer); } @@ -101,7 +101,7 @@ public class GameServiceTest { GameService gameService = new GameService(); gameService.getGame().setLastPlayedCard(new Card().setColor(Card.Color.YELLOW).setValue(Card.Value.THREE)); - boolean answer = gameService.legalMove(new Player(), input); + boolean answer = gameService.legalMove(input); // assert assertEquals(expected, answer); } @@ -116,7 +116,7 @@ public class GameServiceTest { GameService gameService = new GameService(); gameService.getGame().setLastPlayedCard(new Card().setColor(Card.Color.YELLOW).setValue(Card.Value.THREE)); - boolean answer = gameService.legalMove(new Player(), input); + boolean answer = gameService.legalMove(input); // assert assertEquals(expected, answer); } @@ -131,7 +131,7 @@ public class GameServiceTest { GameService gameService = new GameService(); gameService.getGame().setLastPlayedCard(new Card().setColor(Card.Color.GREEN).setValue(Card.Value.FIVE)); - boolean answer = gameService.legalMove(new Player(), input); + boolean answer = gameService.legalMove(input); // assert assertEquals(expected, answer); }