Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore "score" results #730

Closed
Askaholic opened this issue Feb 27, 2021 · 1 comment · Fixed by #731
Closed

Ignore "score" results #730

Askaholic opened this issue Feb 27, 2021 · 1 comment · Fixed by #731

Comments

@Askaholic
Copy link
Collaborator

Askaholic commented Feb 27, 2021

Anything that's not defeat, victory, or draw should be completely ignored by the game results logic. Right now score actually means number of kills that the player got, but it interferes with some of the other legacy rating logic (sum of scores) causing rating bugs.

I think we change this line:

server/server/games/game.py

Lines 288 to 291 in 8d95f77

try:
outcome = GameOutcome(result_type.upper())
except ValueError:
outcome = GameOutcome.UNKNOWN

to

try:
    outcome = GameOutcome(result_type.upper())
except ValueError:
    # Log debug about ignoring result
    return
@Askaholic
Copy link
Collaborator Author

Oh and there might be an opportunity to refactor GameOutcome into two separate types: ArmyOutcome and GameOutcome since right now it is used for both.

Askaholic added a commit that referenced this issue Mar 6, 2021
* Add tests for draw bug

* Refactor GameOutcome enum into several enums

We can now distinguish between results in their various stages:
1. Results reported by an individual for a specific army
2. Accepted result for an army based on the individual reports
3. Accepted result for the whole team based on the accepted army results

For instance, it doesn't make sense for a player's game to report the 
status
of a particular result as "conflicting" since conflicts only arise when
multiple players report different results for the same army. The Enum's 
now
reflect that, and you can no longer report a "conflicting" or "unknown"
result directly (as you could have before).

As a consequence, any result string that is not present in the
ArmyReportedOutcome will be ignored. Hence, the ACU kills reported via 
"score"
results will no longer affect the army score calculation (previously 
these
could turn a -10 score from a defeat into a positive number if the 
player got
any acu kills).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant