From 5b723d4d603923e84f9e256f825741aaa60c115a Mon Sep 17 00:00:00 2001 From: hadi Date: Mon, 6 May 2019 23:21:44 +0430 Subject: [PATCH] AI bug insert fixed --- src/server/models/game/Game.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/models/game/Game.java b/src/server/models/game/Game.java index 0972cc2a..d97319d9 100644 --- a/src/server/models/game/Game.java +++ b/src/server/models/game/Game.java @@ -172,7 +172,7 @@ private void playCurrentTurn() throws LogicException { actions.calculateAvailableAttacks(this); } actions.calculateAvailableInsets(this); - while (actions.getHandInserts().size() > 0 && actions.getCollectibleInserts().size() > 0) { + while (actions.getHandInserts().size() > 0 || actions.getCollectibleInserts().size() > 0) { if (new Random().nextInt(2) == 1) { Insert insert = actions.getHandInserts().get(new Random().nextInt(actions.getHandInserts().size())); insert("AI", insert.getCard().getCardId(), new Position(new Random().nextInt(5), new Random().nextInt(9)));