Files
3DChess/app/src/main/java/chess/ai/actions/AIActionMove.java
fl.du.pr Grens 97950403a5
All checks were successful
Linux arm64 / Build (push) Successful in 33s
class documentation - a shitload of it
2025-05-18 20:08:22 +02:00

29 lines
593 B
Java

package chess.ai.actions;
import chess.controller.CommandExecutor;
import chess.controller.commands.MoveCommand;
import chess.model.Move;
/**
* Manage the transition between model and bots when it comes to Move command.
*/
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);
}
}