Piece isWhite
This commit is contained in:
parent
5d33e1ed08
commit
fe64a4abe3
|
|
@ -16,11 +16,11 @@ public class Main {
|
||||||
testBoard.getWidth();
|
testBoard.getWidth();
|
||||||
System.out.println(testBoard.toString());
|
System.out.println(testBoard.toString());
|
||||||
|
|
||||||
/*Piece testPiece = new Piece();
|
Piece testPiece = new Piece();
|
||||||
testPiece.getX();
|
testPiece.getX();
|
||||||
testPiece.getY();
|
testPiece.getY();
|
||||||
testPiece.getType();
|
testPiece.getType();
|
||||||
testPiece.isWhite();*/
|
testPiece.isWhite();
|
||||||
|
|
||||||
|
|
||||||
// launches graphical interface :
|
// launches graphical interface :
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,13 @@ package backend;
|
||||||
|
|
||||||
public class Piece {
|
public class Piece {
|
||||||
|
|
||||||
|
private boolean color;
|
||||||
private int x;
|
private int x;
|
||||||
private int y;
|
private int y;
|
||||||
private PieceType type;
|
private PieceType type;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public int getX() {
|
public int getX() {
|
||||||
System.out.println("The X value is " + x);
|
System.out.println("The X value is " + x);
|
||||||
return x;
|
return x;
|
||||||
|
|
@ -23,8 +26,8 @@ public class Piece {
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isWhite() {
|
public boolean isWhite() {
|
||||||
|
System.out.println("The PieceType value is white: " + color);
|
||||||
return false;
|
return color;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue