reorganization
This commit is contained in:
parent
a2e87345fb
commit
cd24b5d2e9
|
|
@ -1,7 +1,4 @@
|
|||
import backend.Board;
|
||||
import backend.Move;
|
||||
import backend.Piece;
|
||||
import backend.PieceType;
|
||||
import windowInterface.MyInterface;
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,55 +1,27 @@
|
|||
package backend;
|
||||
|
||||
|
||||
|
||||
public class Move {
|
||||
|
||||
private int fromX, fromY;
|
||||
|
||||
private int toX, toY;
|
||||
|
||||
private boolean isWhite;
|
||||
|
||||
private PieceType type;
|
||||
|
||||
private Piece capturedPiece;
|
||||
|
||||
|
||||
|
||||
public Move(int fromX, int fromY, int toX, int toY, boolean isWhite, PieceType type, Piece capturedPiece) {
|
||||
|
||||
this.fromX = fromX;
|
||||
|
||||
this.fromY = fromY;
|
||||
|
||||
this.toX = toX;
|
||||
|
||||
this.toY = toY;
|
||||
|
||||
this.isWhite = isWhite;
|
||||
|
||||
this.type = type;
|
||||
|
||||
this.capturedPiece = capturedPiece;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Getters
|
||||
|
||||
public int getFromX() { return fromX; }
|
||||
|
||||
public int getFromY() { return fromY; }
|
||||
|
||||
public int getToX() { return toX; }
|
||||
|
||||
public int getToY() { return toY; }
|
||||
|
||||
public boolean isWhite() { return isWhite; }
|
||||
|
||||
public PieceType getType() { return type; }
|
||||
|
||||
public Piece getCapturedPiece() { return capturedPiece; }
|
||||
|
||||
}
|
||||
|
|
@ -1,61 +1,25 @@
|
|||
package backend;
|
||||
|
||||
|
||||
|
||||
public class Piece {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private int x, y;
|
||||
|
||||
private boolean isWhite;
|
||||
|
||||
private PieceType type;
|
||||
|
||||
|
||||
|
||||
public Piece(int x, int y, boolean isWhite, PieceType type) {
|
||||
|
||||
this.x = x;
|
||||
|
||||
this.y = y;
|
||||
|
||||
this.isWhite = isWhite;
|
||||
|
||||
this.type = type;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
public int getX() {
|
||||
|
||||
return x;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
public int getY() {
|
||||
|
||||
return y;
|
||||
|
||||
}
|
||||
|
||||
public PieceType getType() {
|
||||
|
||||
return type;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
public boolean isWhite() {
|
||||
|
||||
return isWhite;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue