oops
This commit is contained in:
@@ -20,8 +20,7 @@ public class Bishop extends Piece {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
public boolean equals(Object obj) {
|
||||||
public boolean equals(Piece obj) {
|
|
||||||
return (obj instanceof Bishop && ((Bishop) obj).getColor() == this.getColor());
|
return (obj instanceof Bishop && ((Bishop) obj).getColor() == this.getColor());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -20,8 +20,7 @@ public class King extends Piece {
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
public boolean equals(Object obj) {
|
||||||
public boolean equals(Piece obj) {
|
|
||||||
return (obj instanceof King && ((King) obj).getColor() == this.getColor());
|
return (obj instanceof King && ((King) obj).getColor() == this.getColor());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,8 +20,7 @@ public class Knight extends Piece {
|
|||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
public boolean equals(Object obj) {
|
||||||
public boolean equals(Piece obj) {
|
|
||||||
return (obj instanceof Knight && ((Knight) obj).getColor() == this.getColor());
|
return (obj instanceof Knight && ((Knight) obj).getColor() == this.getColor());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,8 +24,7 @@ public class Pawn extends Piece {
|
|||||||
return 3;
|
return 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
public boolean equals(Object obj) {
|
||||||
public boolean equals(Piece obj) {
|
|
||||||
return (obj instanceof Pawn && ((Pawn) obj).getColor() == this.getColor());
|
return (obj instanceof Pawn && ((Pawn) obj).getColor() == this.getColor());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,8 +20,7 @@ public class Queen extends Piece {
|
|||||||
return 4;
|
return 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
public boolean equals(Object obj) {
|
||||||
public boolean equals(Piece obj) {
|
|
||||||
return (obj instanceof Queen && ((Queen) obj).getColor() == this.getColor());
|
return (obj instanceof Queen && ((Queen) obj).getColor() == this.getColor());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,8 +20,7 @@ public class Rook extends Piece {
|
|||||||
return 5;
|
return 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
public boolean equals(Object other) {
|
||||||
public boolean equals(Piece obj) {
|
return (other instanceof Rook && ((Rook) other).getColor() == this.getColor());
|
||||||
return (obj instanceof Rook && ((Rook) obj).getColor() == this.getColor());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user