tests + ado equals override
This commit is contained in:
@@ -19,4 +19,9 @@ public class Knight extends Piece {
|
||||
public int hashCode() {
|
||||
return 2;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Piece obj) {
|
||||
return (obj instanceof Knight && ((Knight) obj).getColor() == this.getColor());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user