public int getWorldDimension(String worldName, boolean x){
        if (x){
            switch(worldName){
                case smallcity:
                    return smallCityXLength;
                case bar10:
                case bar11:
                    return barXLength;
                default:
                    return smallCityXLength;
            }
        } else {
            switch(worldName){
                case smallcity:
                    return smallCityYLength;
                case bar10:
                case bar11:
                    return barYLength;
                default:
                    return smallCityYLength;
            }
        }
        
    }