private void spaceBuildings(){
		int numberOfColumns = buildings.size();
		int maxNumberOfRows = 0;
		for(ArrayList<Building> b: buildings){
			maxNumberOfRows = Math.max(maxNumberOfRows, b.size());
		}
		
		float[] xSpace = new float[numberOfColumns];
		float[] ySpace = new float[maxNumberOfRows];
		
		float[] buildingsDistX = new float[numberOfColumns];;
		float[] buildingsDistY = new float[maxNumberOfRows];
		for(int i = 0; i < buildings.size(); i++){
			for(int j = 0; j < buildings.get(i).size(); j++){
				buildingsDistX[i] = buildingsDistX[i] + buildings.get(i).get(j).getWidth();
				buildingsDistY[j] = buildingsDistY[j] + buildings.get(i).get(j).getLength();
			}
		}
		
		for(int i = 0; i < xSpace.length; i++){
			xSpace[i] = (width-buildingsDistX[i])/buildings.get(i).size();
		}
		for(int i = 0; i < ySpace.length; i++){
			ySpace[i] = (length-buildingsDistY[i])/colomnSize(i , numberOfColumns);
		}
		
		float editX;
		float editY;
		for(int i = 0; i < buildings.size()-1; i++){
			for(int j = 0; j < buildings.get(i).size()-1; j++){
				Building building = buildings.get(i).get(j);
				try{
					Building editBuildingRight = buildings.get(i).get(j+1);
					Building editBuildingDown = buildings.get(i+1).get(j);
					
					editX = locations.get(building).getX() + building.getWidth() + xSpace[i];
					editY = locations.get(building).getY() + building.getLength() + ySpace[j];
					
					locations.get(editBuildingRight).setX(editX);
					locations.get(editBuildingDown).setY(editY);
				}
				catch(Exception e){}
			}
		}
	}