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