fix en passant
This commit is contained in:
@@ -30,7 +30,7 @@ public class Move {
|
||||
int diffY = getFinish().getY() - getStart().getY();
|
||||
|
||||
assert Math.abs(diffX) < Coordinate.VALUE_MAX : "Move is too big!";
|
||||
assert Math.abs(diffX) < Coordinate.VALUE_MAX : "Move is too big!";
|
||||
assert Math.abs(diffY) < Coordinate.VALUE_MAX : "Move is too big!";
|
||||
|
||||
if (diffX == 0)
|
||||
return Math.abs(diffY);
|
||||
@@ -53,4 +53,11 @@ public class Move {
|
||||
return deadPieceCoords;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (obj instanceof Move other)
|
||||
return this.start.equals(other.start) && this.finish.equals(other.finish);
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user