started on b

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

View File

@@ -4,10 +4,14 @@ import java.util.ArrayList;
import java.util.List;
import uebung09.iterator.Array2dIterator;
public class Board extends Array2dIterator<Piece> {
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");