When two players have the same score, show Draw result #4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In my opinion, a better solution would be to modify the
api
results. Returning the "players" in order from highest to lowest score, means you can't map the score back to the original player order. It's an odd user experience to plugin a player 1 and a player 2, and then always have the highest score on the left side (essentially swapping player 1 and player 2 when player 2 is the winner). If the players were calculated and returned back in the original order they were submitted, then the scores could easily be mapped back to the original UI, resulting in a better UX (in my opinion of course).Closes #3
UPDATE
I ended up doing exactly as I suggested above and reworking the API to not over process the results. If for some reason you disagree, I can drop the last commit and only have the Draw state update.