small update with constructors
This commit is contained in:
parent
92d7cc6aeb
commit
4dc627050c
|
|
@ -3,17 +3,18 @@ package backend;
|
|||
public class Piece {
|
||||
|
||||
private int x;
|
||||
private int y;
|
||||
|
||||
public Piece(int x) {
|
||||
this.x = 0;
|
||||
|
||||
public Piece(int x, int y) {
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
}
|
||||
public int getX() {
|
||||
return 0;
|
||||
return x;
|
||||
}
|
||||
|
||||
public int getY() {
|
||||
return 0;
|
||||
return y;
|
||||
}
|
||||
|
||||
public PieceType getType() {
|
||||
|
|
|
|||
Loading…
Reference in New Issue