implement Piece constructor and getter
This commit is contained in:
parent
74747eeeb5
commit
af610e408e
|
|
@ -2,20 +2,33 @@ package backend;
|
|||
|
||||
public class Piece {
|
||||
|
||||
private int x;
|
||||
private int y;
|
||||
private PieceType type;
|
||||
private boolean isWhite;
|
||||
|
||||
public Piece(int x, int y, PieceType type,boolean isWhite) {
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.type = type;
|
||||
this.isWhite = isWhite;
|
||||
}
|
||||
|
||||
|
||||
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