class documentation - a shitload of it
All checks were successful
Linux arm64 / Build (push) Successful in 33s

This commit is contained in:
2025-05-18 20:08:22 +02:00
parent 523eb094e1
commit 97950403a5
85 changed files with 378 additions and 94 deletions

View File

@@ -10,7 +10,10 @@ import chess.model.Color;
import chess.model.Coordinate;
import chess.model.Piece;
public abstract class AI extends GameAdapter {
/**
* Abstract class, used to code bots.
*/
public abstract class AI extends GameAdapter implements AIActions {
protected final CommandExecutor commandExecutor;
protected final Color color;
@@ -30,12 +33,9 @@ public abstract class AI extends GameAdapter {
play();
}
protected List<AIAction> getAllowedActions() {
return AIActions.getAllowedActions(this.commandExecutor);
}
protected Piece pieceAt(Coordinate coordinate) {
return AIActions.pieceAt(coordinate, this.commandExecutor);
@Override
public CommandExecutor getCommandExecutor() {
return this.commandExecutor;
}
}