diff --git a/app/src/main/java/chess/ai/DumbAI.java b/app/src/main/java/chess/ai/DumbAI.java index 5ee49f4..9396c3e 100644 --- a/app/src/main/java/chess/ai/DumbAI.java +++ b/app/src/main/java/chess/ai/DumbAI.java @@ -35,20 +35,12 @@ public class DumbAI extends AI { return; } - case Small: { - int randomMove = this.random.nextInt(moves.size() + 1); - if (randomMove != moves.size()) - break; - this.commandExecutor.executeCommand(new CastlingCommand(false)); - return; - - } - + case Small: case Big: { int randomMove = this.random.nextInt(moves.size() + 1); if (randomMove != moves.size()) break; - this.commandExecutor.executeCommand(new CastlingCommand(true)); + this.commandExecutor.executeCommand(new CastlingCommand(castlings == CastlingResult.Big)); return; }