private void generateCorridors() {
		ArrayList<Integer> lstx = new ArrayList<Integer>();
		ArrayList<Integer> lsty = new ArrayList<Integer>();
		//all of this for loop is for checking if a room is there or not
		for (int x = 0; x < this.width; x++) {
			for (int y = 0; y < this.height; y++) {
				if (tiles[x][y].isGround()) {
					if (lstx.size() > 0) {
						boolean found = true;
						/*for (int i = 0; i < lstx.size(); i++) {
							if (isConnected(lstx.get(i), lsty.get(i), x, y)) {
								found = false;
								break;
							}
						}*/
						if (found) {
							lstx.add(x);
							lsty.add(y);
						}
					} else {
						lstx.add(x);
						lsty.add(y);
					}
				}
			}
		}
		//this code is for generating the actual corridors
		for (int i = 0; i < lstx.size()-1; i++) {
			generatePath(lstx.get(i), lsty.get(i), lstx.get(i+1), lsty.get(i+1));
		}
	}