added isWhite, pieceType and getter of X and Y in piece
This commit is contained in:
parent
a062e55489
commit
dc00037eaa
|
|
@ -1,21 +1,35 @@
|
|||
package backend;
|
||||
|
||||
public class Piece {
|
||||
|
||||
private int x;
|
||||
private int y;
|
||||
private boolean isWhite;
|
||||
private PieceType type;
|
||||
|
||||
public Piece(int x, int y, boolean isWhite, PieceType type) {
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.isWhite = isWhite;
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
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