diff --git a/src/main/java/de/hsfulda/onses/services/PlayerService.java b/src/main/java/de/hsfulda/onses/services/PlayerService.java index 3c3fb47..ce5b5e8 100644 --- a/src/main/java/de/hsfulda/onses/services/PlayerService.java +++ b/src/main/java/de/hsfulda/onses/services/PlayerService.java @@ -3,6 +3,7 @@ package de.hsfulda.onses.services; import de.hsfulda.onses.models.Game; import de.hsfulda.onses.models.Player; import de.hsfulda.onses.models.Card; +import de.hsfulda.onses.services.GameService; import java.util.ArrayList; @@ -58,4 +59,12 @@ public class PlayerService { } player.getPlayerDeck().remove(card); } + + public void botMove() { + for (int i = 0; i < this.playerList.getLast().getPlayerDeck().size(); i++) { + if (getGame().getGameService().legalMove(this.playerList.getLast().getPlayerDeck().get(i))) { + //do something... + } + } + } }