this if/elif block could be reduced to a lookup in a dict:

```python
# defined at global scope
# {mode:[score_position, score_reverse,second_score]}
LIMIT_MODES = {'COMPOSITE':[3, True, 1],
                           'AVERAGE':[1, True, 3],
                           ...
}

# inside function:
score_position, score_reverse, second_score = LIMIT_MODES.get(limit_mode, [None, None, None]
if score_position is None:
    raise ValueError("blah blah")
```

this has the advantage of being O(1) on the comparison, and reduces the lines of code needed in this function substantially while maintaining readability