public void calculateBounds() {
        if (A.getX() < B.getX()) {
            lowerX = A;
            higherX = B;
        } else {
            lowerX = B;
            higherX = A;
        }
        if (A.getY() < B.getY()) {
            lowerY = A;
            higherY = B;
        } else {
            higherY = A;
            lowerY = B;
        }
    }