Piece isWhite

This commit is contained in:
Juliette 2025-04-17 11:18:30 +02:00
parent 5d33e1ed08
commit fe64a4abe3
2 changed files with 8 additions and 5 deletions

View File

@ -16,11 +16,11 @@ public class Main {
testBoard.getWidth();
System.out.println(testBoard.toString());
/*Piece testPiece = new Piece();
Piece testPiece = new Piece();
testPiece.getX();
testPiece.getY();
testPiece.getType();
testPiece.isWhite();*/
testPiece.isWhite();
// launches graphical interface :

View File

@ -2,10 +2,13 @@ package backend;
public class Piece {
private boolean color;
private int x;
private int y;
private PieceType type;
public int getX() {
System.out.println("The X value is " + x);
return x;
@ -15,7 +18,7 @@ public class Piece {
System.out.println("The Y value is " + y);
return y;
}
public PieceType getType() {
System.out.println("The PieceType value is " + type);
@ -23,8 +26,8 @@ public class Piece {
}
public boolean isWhite() {
return false;
System.out.println("The PieceType value is white: " + color);
return color;
}
}