leaving debug printing and reseting piece position if not placed
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing

This commit is contained in:
Debucquoy Anthony 2023-05-11 11:47:16 +02:00
parent 334e0ad99b
commit 0f1ecc753b
Signed by: tonitch
GPG Key ID: A78D6421F083D42E

View File

@ -39,6 +39,7 @@ public class Map extends Shape{
if(!pieces.contains(piece))
return false;
piece.setPosition(null);
// In the map limits
if ( pos.x + piece.height > height
|| pos.y+piece.width > width
@ -54,7 +55,6 @@ public class Map extends Shape{
occupation.add(o);
}
}
System.out.println(occupation);
for (int x = pos.x; x < pos.x + piece.height; x++) {
for (int y = pos.y; y < pos.y + piece.width; y++) {
@ -64,7 +64,6 @@ public class Map extends Shape{
}
}
piece.setPosition(pos);
return true;
}