Compare commits
2 Commits
5d33e1ed08
...
ad70ff95d1
| Author | SHA1 | Date |
|---|---|---|
|
|
ad70ff95d1 | |
|
|
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(PieceType.Knight);
|
||||||
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;
|
||||||
|
|
@ -15,7 +18,7 @@ public class Piece {
|
||||||
System.out.println("The Y value is " + y);
|
System.out.println("The Y value is " + y);
|
||||||
return y;
|
return y;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public PieceType getType() {
|
public PieceType getType() {
|
||||||
System.out.println("The PieceType value is " + type);
|
System.out.println("The PieceType value is " + type);
|
||||||
|
|
@ -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