This commit is contained in:
@@ -44,6 +44,16 @@ public interface CommandSender {
|
||||
return cmd.getCastlingResult();
|
||||
}
|
||||
|
||||
default boolean canDoCastling() {
|
||||
CastlingResult castlings = getAllowedCastlings();
|
||||
return castlings == CastlingResult.Both || castlings == CastlingResult.Small;
|
||||
}
|
||||
|
||||
default boolean canDoBigCastling() {
|
||||
CastlingResult castlings = getAllowedCastlings();
|
||||
return castlings == CastlingResult.Both || castlings == CastlingResult.Big;
|
||||
}
|
||||
|
||||
default Piece getPieceAt(int x, int y) {
|
||||
return getPieceAt(new Coordinate(x, y));
|
||||
}
|
||||
@@ -77,7 +87,7 @@ public interface CommandSender {
|
||||
}
|
||||
|
||||
default CommandResult sendBigCastling() {
|
||||
return sendCommand(new CastlingCommand(false));
|
||||
return sendCommand(new CastlingCommand(true));
|
||||
}
|
||||
|
||||
default CommandResult sendMove(Move move) {
|
||||
|
||||
Reference in New Issue
Block a user