started on b

This commit is contained in:
Johannes Schmelz 2024-06-13 18:15:48 +00:00
parent 49262c4954
commit 440eed0e9d
4 changed files with 6 additions and 1 deletions

Binary file not shown.

Binary file not shown.

View File

@ -8,6 +8,10 @@ public class Board extends Array2dIterator<Piece> {
private final Piece[][] field = new Piece[8][8];
private final List<Piece> pieces = new ArrayList<>();
Board(){
}
void add(Piece piece) {
if (piece.getBoard() != this)
throw new IllegalArgumentException("wrong board");

View File

@ -12,6 +12,7 @@ public class ChessApp {
private static final String BLACK_QUEEN = "Q";
private static final String WHITE_KNIGHT = "n";
private static final String BLACK_KNIGHT = "N";
private static final String ITERATOR = "i";
private final Scanner scanner;
private final Board board;