From b068cb2cf475278a2b04a03ca30067e79327a2d5 Mon Sep 17 00:00:00 2001 From: fdai7793 Date: Sat, 3 Feb 2024 18:57:17 +0100 Subject: [PATCH] removeCardFromBotDeck --- src/main/java/de/hsfulda/onses/services/PlayerService.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/de/hsfulda/onses/services/PlayerService.java b/src/main/java/de/hsfulda/onses/services/PlayerService.java index ce5b5e8..089e50c 100644 --- a/src/main/java/de/hsfulda/onses/services/PlayerService.java +++ b/src/main/java/de/hsfulda/onses/services/PlayerService.java @@ -63,7 +63,8 @@ public class PlayerService { 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... + this.removeCardFromPlayerDeck(this.playerList.getLast().getPlayerDeck().get(i)); + break; } } }