Merge branch 'master' of https://gitarero.ecam.fr/noa.four/OOP_Group1B2_Project
This commit is contained in:
commit
ccf5a9a951
|
|
@ -6,6 +6,7 @@ public class Game extends Thread {
|
|||
|
||||
private AutoPlayer aiPlayer;
|
||||
private Board board;
|
||||
private Piece newPiece;
|
||||
|
||||
private MyInterface mjf;
|
||||
private int COL_NUM = 8;
|
||||
|
|
@ -67,7 +68,7 @@ public class Game extends Thread {
|
|||
}
|
||||
|
||||
public void setPiece(boolean isWhite, PieceType type, int x, int y) {
|
||||
board.setPiece(isWhite, type, x, y);
|
||||
this.newPiece = new Piece(x, y,type, isWhite);
|
||||
}
|
||||
|
||||
public String[] getFileRepresentation() {
|
||||
|
|
|
|||
|
|
@ -32,7 +32,11 @@ public class Move {
|
|||
public Piece getCapturedPiece() {
|
||||
return capturedPiece;
|
||||
}
|
||||
public Piece isCapture() {
|
||||
return capturedPiece;
|
||||
public boolean isCapture() {
|
||||
return capturedPiece != null;
|
||||
}
|
||||
public String toString() {
|
||||
return piece + ":("+ fromX + "," + fromY + ")-("+ toX + "," + toY + ")" + ( capturedPiece != null? "capturing "+ capturedPiece: "");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue