DownDate to java 11
This commit is contained in:
@ -68,7 +68,8 @@ public class Piece extends Shape{
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if(obj instanceof Piece pieceObj){
|
||||
if(obj instanceof Piece){
|
||||
Piece pieceObj = (Piece) obj;
|
||||
if( pieceObj.getPosition().equals(this.getPosition()) && pieceObj.getShape().equals(getShape())) {
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user