private void addDoor(int x, int y)
    {
        Transform doorTransform = new Transform();

        boolean xDoor = (level.getPixel(x, y - 1) & 0xFFFFFF) == 0 && (level.getPixel(x, y + 1) & 0xFFFFFF) == 0;
        boolean yDoor = (level.getPixel(x - 1, y) & 0xFFFFFF) == 0 && (level.getPixel(x + 1, y) & 0xFFFFFF) == 0;

        if(!(xDoor ^ yDoor))
        {
            System.err.println("Bad map Building at X:"+x+" , Y:"+y);
            new Exception().printStackTrace();
            System.exit(1);
        }

        Vector3f openPos = null;

        if(yDoor)
        {
            doorTransform.setTranslation(x,0, y + SPOT_LENGTH / 2);
            openPos = doorTransform.getTranslation().sub(new Vector3f(DOOR_OPEN_MOVAMT, 0.0f, 0.0f));
        }

        if(xDoor)
        {
            doorTransform.setTranslation(x + SPOT_WIDTH / 2,0, y);
            doorTransform.setRotation(0,90,0);
            openPos = doorTransform.getTranslation().sub(new Vector3f(0, 0.0f, DOOR_OPEN_MOVAMT));
        }


        doors.add(new Door(doorTransform, material, openPos));
    }