piece
This commit is contained in:
parent
4206f7e5f9
commit
d802462ea0
|
|
@ -6,6 +6,7 @@ public class Board {
|
|||
|
||||
private int width;
|
||||
private int height;
|
||||
private ArrayList<Piece> pieces = new ArrayList<>();
|
||||
|
||||
public Board(int colNum, int lineNum) {
|
||||
this.width = colNum;
|
||||
|
|
|
|||
|
|
@ -1,21 +1,32 @@
|
|||
package backend;
|
||||
|
||||
public class Piece {
|
||||
private int x;
|
||||
private int y;
|
||||
private PieceType type;
|
||||
private boolean isWhite;
|
||||
|
||||
public Piece(PieceType type, boolean isWhite, int x, int y) {
|
||||
this.type = type;
|
||||
this.isWhite = isWhite;
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
}
|
||||
|
||||
public int getX() {
|
||||
return 0;
|
||||
return x;
|
||||
}
|
||||
|
||||
public int getY() {
|
||||
return 0;
|
||||
return y;
|
||||
}
|
||||
|
||||
public PieceType getType() {
|
||||
return null;
|
||||
return type;
|
||||
}
|
||||
|
||||
public boolean isWhite() {
|
||||
return false;
|
||||
return isWhite;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue