Description:
The avg and process functions currently contain complex and nested conditional logic, making them difficult to read and maintain. This issue focuses on refactoring both functions to improve clarity, reduce redundancy, and enhance overall efficiency.
Suggested Solution:
Optimize avg Function: Simplify conditions for current and previous to make the function more readable without affecting performance.
Refactor process Function Logic: Replace nested if-else conditions with a dictionary-based approach to handle cheat detection cases in a more structured way.