refactored pawn movement + implemented knight movement

This commit is contained in:
CT
2026-04-23 16:18:28 -05:00
parent 6e6c222d57
commit ce61482b9e
4 changed files with 34 additions and 18 deletions

View File

@@ -26,6 +26,10 @@ public class Board {
}
public boolean isOpen(Position pos) {
return this.board[pos.x][pos.y] == null;
return this.getPiece(pos) == null;
}
public Piece getPiece(Position pos) {
return this.board[pos.x][pos.y];
}
}