iswhite method
This commit is contained in:
parent
f01cc5d127
commit
b6d66394af
|
|
@ -5,11 +5,13 @@ public class Piece {
|
|||
private int x;
|
||||
private int y;
|
||||
private PieceType type;
|
||||
private Boolean color;
|
||||
|
||||
public Piece(int xCoord, int yCoord, PieceType typeConstructor) {
|
||||
public Piece(int xCoord, int yCoord, PieceType typeConstructor, boolean colorConstructor) {
|
||||
this.x = xCoord;
|
||||
this.y = yCoord;
|
||||
this.type = typeConstructor;
|
||||
this.color = colorConstructor;
|
||||
}
|
||||
public int getX() {
|
||||
return x;
|
||||
|
|
@ -24,7 +26,7 @@ public class Piece {
|
|||
}
|
||||
|
||||
public boolean isWhite() {
|
||||
return false;
|
||||
return color;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue