File Parser for levels (#18)
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Co-authored-by: Debucquoy Anthony (tonitch) <debucquoy.anthony@gmail.com> Reviewed-on: #18 Reviewed-by: Mat_02 <diletomatteo@gmail.com>
This commit is contained in:
@ -24,10 +24,6 @@ public class Piece extends Shape{
|
||||
}
|
||||
|
||||
public void setPosition(Vec2 position){
|
||||
if (linked_map == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.Position = position;
|
||||
}
|
||||
|
||||
@ -56,4 +52,14 @@ public class Piece extends Shape{
|
||||
matrix = temp_matrix;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if(obj instanceof Piece pieceObj){
|
||||
if( pieceObj.getPosition().equals(this.getPosition()) && pieceObj.getShape().equals(getShape())) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user