Compare commits
No commits in common. "440eed0e9d2aef20749bf92662b6147a238210e6" and "fa85372c139b477a0148f94d39f5e70ad9dce8f3" have entirely different histories.
440eed0e9d
...
fa85372c13
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,17 +1,12 @@
|
||||
package uebung09.chess;
|
||||
package chess;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import uebung09.iterator.Array2dIterator;
|
||||
|
||||
public class Board extends Array2dIterator<Piece>{
|
||||
public class Board {
|
||||
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");
|
||||
|
@ -1,4 +1,4 @@
|
||||
package uebung09.chess;
|
||||
package chess;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.util.NoSuchElementException;
|
||||
@ -12,7 +12,6 @@ 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;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package uebung09.chess;
|
||||
package chess;
|
||||
|
||||
public enum Color {
|
||||
black, white
|
||||
|
@ -1,4 +1,4 @@
|
||||
package uebung09.chess;
|
||||
package chess;
|
||||
|
||||
import static java.lang.Math.abs;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
package uebung09.chess;
|
||||
package chess;
|
||||
|
||||
public abstract class Piece {
|
||||
private Color color;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package uebung09.chess;
|
||||
package chess;
|
||||
|
||||
import static java.lang.Integer.signum;
|
||||
import static java.lang.Math.abs;
|
||||
|
@ -1,4 +1,4 @@
|
||||
package uebung09.collection;
|
||||
package collection;
|
||||
|
||||
/**
|
||||
* A set of elements that does not contain any element twice.
|
||||
|
@ -1,4 +1,4 @@
|
||||
package uebung09.collection;
|
||||
package collection;
|
||||
|
||||
public class SetFactory {
|
||||
|
||||
|
@ -1,25 +0,0 @@
|
||||
package uebung09.iterator;
|
||||
|
||||
import java.util.Iterator;
|
||||
|
||||
public class Array2dIterator<T> implements Iterator<T>{
|
||||
|
||||
|
||||
public <T> Array2dIterator(T[][] aaray) {
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasNext() {
|
||||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public T next() {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user