function get_score(resolution, length, i, term_length, x) {

    return i && 1 < resolution ? length + (term_length || 0) <= resolution ? i + (x || 0) : 0 | (resolution - 1) / (length + (term_length || 0)) * (i + (x || 0)) + 1 : 0;
}
@param {number} resolution
@param {number} length
@param {number} i
@param {number=} term_length
@param {number=} x
@returns {number}