Closed bonbud-macryg closed 1 year ago
Bug: draws aren't shown in the UI tally.
I think I've found the culprit, receiveArchivedGame
is storing two versions of our (~dev) results in tallies
. It's also not storing draws in opponents' results. Will address later.
@bonbud-macryg The code itself looks good. Are the ~dev
games from playing against yourself? I think that might confuse the algorithm in chessStore
. We should probably have code to ignore computing tallies when our ship is both sides.
@ashelkovnykov Having a safeguard against playing yourself is a good idea, I should add that in. But all these games are between ~dev and ~ser. As of c6ac28c
~dev is seeing the right output but ~ser isn't seeing draws in the tallies
results from receiveArchivedGames
.
Found the source of the bug: When a game ends in a draw, the player who made the final move correctly logs this but the other player never receives the move.
This is reflected both in each player's Results
tuple (logged in both receiveArchivedGame
and getTally
) and in the backend, checked via +dbug
. The player who should have received the concluding move still has the game stored in their active games.
Fastest way to draw a game here.
Looks like this bug is present in develop
as well. I remember testing this PR with no issue before your review, back when it was based on PR #109 rather than develop
.
Some outstanding linter issues still to be taken care of.
Resolves #17.