private Door[] sortDoors(int whichWall) {
        ArrayList<Door> doorTempList = new ArrayList<>();
        doorTempList.addAll(doors.get(whichWall));              //copy doors into temp list
        Door[] temp = new Door[doors.get(whichWall).size()];
        if (temp.length > 0) {
            for (int i = 0; i < temp.length; i++) {
                int smallest = 0;
                for (int d = 0; d < doorTempList.size(); d++) {
                    if (doorTempList.get(d).getX() < doorTempList.get(smallest).getX()) {
                        smallest = d;
                    }
                }
                temp[i] = doorTempList.get(smallest);
                doorTempList.remove(smallest);
            }
        }
        return temp;
    }