From 2c9c3acb680c580bf7e867acc9d1025f8bc72eb7 Mon Sep 17 00:00:00 2001 From: fdai7793 Date: Mon, 5 Feb 2024 19:39:42 +0100 Subject: [PATCH] addBotMovesAfterPlayer --- src/main/java/de/hsfulda/onses/services/GameService.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/de/hsfulda/onses/services/GameService.java b/src/main/java/de/hsfulda/onses/services/GameService.java index 30a48fb..ea8824f 100644 --- a/src/main/java/de/hsfulda/onses/services/GameService.java +++ b/src/main/java/de/hsfulda/onses/services/GameService.java @@ -145,6 +145,11 @@ public class GameService { break; } checkForWin(); + if (!this.test) { + if (!game.getPlayerService().getCurrentTurn()) { + game.getPlayerService().botMove(); + } + } } public boolean legalMove(Card card) {