width and height method working - can be changed also
This commit is contained in:
parent
ee3491a243
commit
1cea1d46e0
|
|
@ -4,19 +4,23 @@ import java.util.ArrayList;
|
||||||
|
|
||||||
public class Board {
|
public class Board {
|
||||||
private Piece[][] board;
|
private Piece[][] board;
|
||||||
|
private int width;
|
||||||
|
private int height;
|
||||||
|
|
||||||
public Board(int colNum, int lineNum) {
|
public Board(int colNum, int lineNum) {
|
||||||
this.board = new Piece[8][8]; // 8x8 chess board
|
this.width = colNum; // col move x
|
||||||
|
this.height = lineNum; // line mov in y
|
||||||
|
this.board = new Piece[width][height]; // 8x8 chess board
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getWidth() {
|
public int getWidth() {
|
||||||
//TODO
|
width = 8; // 8 for the moment can be changed
|
||||||
return 0;
|
return width;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getHeight() {
|
public int getHeight() {
|
||||||
//TODO
|
height = 8; // 8 for the moment can be changed
|
||||||
return 0;
|
return height;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getTurnNumber() {
|
public int getTurnNumber() {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue