32 lines
456 B
Java
32 lines
456 B
Java
package backend;
|
|
|
|
public class Piece {
|
|
boolean whitePiece;
|
|
int x;
|
|
int y;
|
|
private PieceType type;
|
|
|
|
public Piece(boolean whitePiece, PieceType type, int x, int y) {
|
|
this.whitePiece = whitePiece;
|
|
this.type = type;
|
|
this.x = x;
|
|
this.y = y;
|
|
}
|
|
public int getX() {
|
|
return x;
|
|
}
|
|
|
|
public int getY() {
|
|
return y;
|
|
}
|
|
|
|
public PieceType getType() {
|
|
return type;
|
|
}
|
|
|
|
public boolean isWhite() {
|
|
return whitePiece;
|
|
}
|
|
|
|
}
|