tests + ado equals override

This commit is contained in:
Janet-Doe
2025-04-16 10:55:27 +02:00
parent 3f06a9eb17
commit 076288a400
9 changed files with 89 additions and 4 deletions

View File

@@ -19,4 +19,9 @@ public class Queen extends Piece {
public int hashCode() {
return 4;
}
@Override
public boolean equals(Piece obj) {
return (obj instanceof Queen && ((Queen) obj).getColor() == this.getColor());
}
}