diff --git a/bin/uebung09/chess/Board.class b/bin/uebung09/chess/Board.class index b8dbe64..8238078 100644 Binary files a/bin/uebung09/chess/Board.class and b/bin/uebung09/chess/Board.class differ diff --git a/bin/uebung09/chess/ChessApp.class b/bin/uebung09/chess/ChessApp.class index e0ba0af..caa1e54 100644 Binary files a/bin/uebung09/chess/ChessApp.class and b/bin/uebung09/chess/ChessApp.class differ diff --git a/src/uebung09/chess/Board.java b/src/uebung09/chess/Board.java index 1d8cfe1..21e9b87 100644 --- a/src/uebung09/chess/Board.java +++ b/src/uebung09/chess/Board.java @@ -4,10 +4,14 @@ import java.util.ArrayList; import java.util.List; import uebung09.iterator.Array2dIterator; -public class Board extends Array2dIterator { +public class Board extends Array2dIterator{ private final Piece[][] field = new Piece[8][8]; private final List pieces = new ArrayList<>(); + Board(){ + + } + void add(Piece piece) { if (piece.getBoard() != this) throw new IllegalArgumentException("wrong board"); diff --git a/src/uebung09/chess/ChessApp.java b/src/uebung09/chess/ChessApp.java index 634d9f9..1fe9baa 100644 --- a/src/uebung09/chess/ChessApp.java +++ b/src/uebung09/chess/ChessApp.java @@ -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;