adding indexes to pieces to create disparate objects
This commit is contained in:
parent
b6d66394af
commit
8225151d90
|
|
@ -36,8 +36,8 @@ public class Board {
|
|||
//TODO
|
||||
}
|
||||
|
||||
public void populateBoard() {
|
||||
//TODO
|
||||
public void populateBoard(Piece piece) {
|
||||
|
||||
}
|
||||
|
||||
public void cleanBoard() {
|
||||
|
|
|
|||
|
|
@ -5,28 +5,38 @@ public class Piece {
|
|||
private int x;
|
||||
private int y;
|
||||
private PieceType type;
|
||||
private Boolean color;
|
||||
private boolean color;
|
||||
private int index;
|
||||
|
||||
public Piece(int xCoord, int yCoord, PieceType typeConstructor, boolean colorConstructor) {
|
||||
public Piece(int xCoord, int yCoord, PieceType typeConstructor, boolean colorConstructor, int indexPiece) {
|
||||
this.x = xCoord;
|
||||
this.y = yCoord;
|
||||
this.type = typeConstructor;
|
||||
this.color = colorConstructor;
|
||||
this.index = indexPiece;
|
||||
}
|
||||
|
||||
// ycoord of the piece
|
||||
public int getX() {
|
||||
return x;
|
||||
}
|
||||
|
||||
|
||||
//ycoord of the piece
|
||||
public int getY() {
|
||||
return y;
|
||||
}
|
||||
|
||||
//type of the piece
|
||||
public PieceType getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
//hypothetic color of the piece
|
||||
public boolean isWhite() {
|
||||
return color;
|
||||
}
|
||||
|
||||
public int getIndex() {
|
||||
return index;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue