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:
25
app/src/main/java/chess/ai/actions/AIActionMove.java
Normal file
25
app/src/main/java/chess/ai/actions/AIActionMove.java
Normal file
@@ -0,0 +1,25 @@
|
||||
package chess.ai.actions;
|
||||
|
||||
import chess.controller.CommandExecutor;
|
||||
import chess.controller.commands.MoveCommand;
|
||||
import chess.model.Move;
|
||||
|
||||
public class AIActionMove extends AIAction{
|
||||
|
||||
private final Move move;
|
||||
|
||||
public AIActionMove(CommandExecutor commandExecutor, Move move) {
|
||||
super(commandExecutor);
|
||||
this.move = move;
|
||||
}
|
||||
|
||||
public Move getMove() {
|
||||
return move;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void applyAction(CommandExecutor commandExecutor) {
|
||||
sendCommand(new MoveCommand(move), commandExecutor);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user