new piece const
This commit is contained in:
parent
0929ec59a4
commit
e06be13a00
|
|
@ -3,10 +3,10 @@ package backend;
|
|||
public class Piece {
|
||||
private int x;
|
||||
private int y;
|
||||
private ChessPieceType type;
|
||||
private PieceType type;
|
||||
private boolean isWhite;
|
||||
|
||||
public Piece(int x, int y, ChessPieceType type, boolean isWhite) {
|
||||
public Piece(int x, int y, PieceType type, boolean isWhite) {
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.type = type;
|
||||
|
|
@ -21,20 +21,11 @@ public class Piece {
|
|||
return y;
|
||||
}
|
||||
|
||||
public ChessPieceType getType() {
|
||||
public PieceType getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public boolean isWhite() {
|
||||
return isWhite; // Returns true if the piece is white, false if black
|
||||
}
|
||||
}
|
||||
|
||||
enum ChessPieceType {
|
||||
Pawn,
|
||||
Rook,
|
||||
Knight,
|
||||
Bishop,
|
||||
Queen,
|
||||
King,
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue