feat: add ai castling (Fixes #4)
All checks were successful
Linux arm64 / Build (push) Successful in 41s
All checks were successful
Linux arm64 / Build (push) Successful in 41s
This commit is contained in:
20
app/src/main/java/chess/ai/actions/AIActionCastling.java
Normal file
20
app/src/main/java/chess/ai/actions/AIActionCastling.java
Normal file
@@ -0,0 +1,20 @@
|
||||
package chess.ai.actions;
|
||||
|
||||
import chess.controller.CommandExecutor;
|
||||
import chess.controller.commands.CastlingCommand;
|
||||
|
||||
public class AIActionCastling extends AIAction{
|
||||
|
||||
private final boolean bigCastling;
|
||||
|
||||
public AIActionCastling(CommandExecutor commandExecutor, boolean bigCastling) {
|
||||
super(commandExecutor);
|
||||
this.bigCastling = bigCastling;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void applyAction(CommandExecutor commandExecutor) {
|
||||
sendCommand(new CastlingCommand(this.bigCastling), commandExecutor);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user