leaving debug printing and reseting piece position if not placed
This commit is contained in:
		@ -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;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user