|
@ -24,7 +24,16 @@ public class GameService { |
|
|
game.getPlayerService().nextTurn(); |
|
|
game.getPlayerService().nextTurn(); |
|
|
} |
|
|
} |
|
|
public void drawCard(int amount) { |
|
|
public void drawCard(int amount) { |
|
|
|
|
|
|
|
|
|
|
|
Player player = null; |
|
|
|
|
|
if (game.getPlayerService().getCurrentTurn()) { |
|
|
|
|
|
player = game.getPlayerService().getPlayerList().getFirst(); |
|
|
|
|
|
} else { |
|
|
|
|
|
player = game.getPlayerService().getPlayerList().getLast(); |
|
|
|
|
|
} |
|
|
|
|
|
for (int i = 0; i < amount; i++) { |
|
|
|
|
|
player.getPlayerDeck().add(game.getDrawCardDeck().getFirst()); |
|
|
|
|
|
game.getDrawCardDeck().removeFirst(); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
public void playCard(Player player, Card card) |
|
|
public void playCard(Player player, Card card) |
|
|
{ |
|
|
{ |
|
|