|
@ -13,14 +13,14 @@ public class ChessBoard { |
|
|
ChessFigure.Type[] order = { |
|
|
ChessFigure.Type[] order = { |
|
|
ChessFigure.Type.CASTLE, ChessFigure.Type.KNIGHT, ChessFigure.Type.BISHOP, ChessFigure.Type.QUEEN, ChessFigure.Type.KING, ChessFigure.Type.BISHOP, ChessFigure.Type.KNIGHT, ChessFigure.Type.CASTLE |
|
|
ChessFigure.Type.CASTLE, ChessFigure.Type.KNIGHT, ChessFigure.Type.BISHOP, ChessFigure.Type.QUEEN, ChessFigure.Type.KING, ChessFigure.Type.BISHOP, ChessFigure.Type.KNIGHT, ChessFigure.Type.CASTLE |
|
|
}; |
|
|
}; |
|
|
for (int i = 0; i < board.length; i++) { |
|
|
|
|
|
|
|
|
for (int x = 0; x < board[0].length; x++) { |
|
|
//sets all pawns |
|
|
//sets all pawns |
|
|
board[i][1] = new ChessFigure(ChessFigure.Type.PAWN, ChessFigure.Team.BLACK); |
|
|
|
|
|
board[i][6] = new ChessFigure(ChessFigure.Type.PAWN, ChessFigure.Team.WHITE); |
|
|
|
|
|
|
|
|
board[1][x] = new ChessFigure(ChessFigure.Type.PAWN, ChessFigure.Team.BLACK); |
|
|
|
|
|
board[6][x] = new ChessFigure(ChessFigure.Type.PAWN, ChessFigure.Team.WHITE); |
|
|
|
|
|
|
|
|
//sets all others |
|
|
//sets all others |
|
|
board[i][0] = new ChessFigure(order[i], ChessFigure.Team.BLACK); |
|
|
|
|
|
board[i][7] = new ChessFigure(order[i], ChessFigure.Team.WHITE); |
|
|
|
|
|
|
|
|
board[0][x] = new ChessFigure(order[x], ChessFigure.Team.BLACK); |
|
|
|
|
|
board[7][x] = new ChessFigure(order[x], ChessFigure.Team.WHITE); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|