|
@ -22,6 +22,9 @@ public class GameService { |
|
|
|
|
|
|
|
|
public void nextPlayer() { |
|
|
public void nextPlayer() { |
|
|
game.getPlayerService().nextTurn(); |
|
|
game.getPlayerService().nextTurn(); |
|
|
|
|
|
} |
|
|
|
|
|
public void drawCard(int amount) { |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
public void playCard(Player player, Card card) |
|
|
public void playCard(Player player, Card card) |
|
|
{ |
|
|
{ |
|
@ -44,6 +47,12 @@ public class GameService { |
|
|
Card.Color color = Card.Color.BLUE; //Vorübergehend Blau |
|
|
Card.Color color = Card.Color.BLUE; //Vorübergehend Blau |
|
|
game.changeLastPlayedCardColor(color); |
|
|
game.changeLastPlayedCardColor(color); |
|
|
} |
|
|
} |
|
|
|
|
|
// Draw |
|
|
|
|
|
if (card.getValue() == Card.Value.DRAWTWO) { |
|
|
|
|
|
nextPlayer(); |
|
|
|
|
|
drawCard(2); |
|
|
|
|
|
nextPlayer(); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public boolean legalMove(Player player, Card card) |
|
|
public boolean legalMove(Player player, Card card) |
|
|