last notes castling
This commit is contained in:
parent
9a8639a2f1
commit
3a6a8f2d72
|
|
@ -47,12 +47,13 @@ public class Piece {
|
||||||
this.y = y;
|
this.y = y;
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean hasMoved = false;
|
|
||||||
|
|
||||||
public boolean hasMoved() {
|
public boolean hasMoved() {//track if a piece has been moved in the past (for castling)
|
||||||
return hasMoved;
|
return hasMoved;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private boolean hasMoved = false;//initially, no piece has been moved
|
||||||
|
|
||||||
public void setMoved(boolean moved) {
|
public void setMoved(boolean moved) {
|
||||||
this.hasMoved = moved;
|
this.hasMoved = moved;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue