File Parser for levels (#18)
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:
2023-04-21 20:00:15 +02:00
parent ac368a6d19
commit 8749c23333
15 changed files with 819 additions and 12 deletions

View File

@ -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;
}
}