Mass createMass(Range distanceRangeX, Range distanceRangeY) {
        boolean takePositiveX = random.nextBoolean();
        boolean takePositiveY = random.nextBoolean();
        double minimalX, maximalX, minimalY, maximalY;

        if (takePositiveX) {
            minimalX = currentPoint.getX() + distanceRangeX.getMin();
            maximalX = currentPoint.getX() + distanceRangeX.getMax();
        } else {
            minimalX = currentPoint.getX() - distanceRangeX.getMax();
            maximalX = currentPoint.getX() - distanceRangeX.getMin();
        }

        if (takePositiveY) {
            minimalY = currentPoint.getY() + distanceRangeY.getMin();
            maximalY = currentPoint.getY() + distanceRangeY.getMax();
        } else {
            minimalY = currentPoint.getY() - distanceRangeY.getMax();
            maximalY = currentPoint.getY() - distanceRangeY.getMin();
        }

        Range xRange = getTigtherRange(new Range(minimalX, maximalX), grammar.getExpansionRangeX());
        Range yRange = new Range(minimalY, maximalY);

        double x = getNumberInRange(xRange);
        double y = getNumberInRange(yRange);

        if (!grammar.options.contains(allowNegativeYValues)) {
            y = Math.abs(y);
        }

        return new Mass(x, y);
    }