feat: give the standings their own screen after the answer split - #11
Merged
Conversation
The stats screen carried the distribution, the top five and the streaks at once, so the points arrived pre-sorted and nobody saw the overtake. Split it: the bars keep the stats screen, and a new scoreboard phase after it opens on the old order at the old scores, then counts the points up while the rows move to their new places.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
The screen that ends a question carried everything at once: the distribution bars, the top five and the streak callouts. The points arrived already sorted, so nobody in the room ever saw the overtake.
Solution
Split it in two. The stats screen keeps the bars alone. A new
scoreboardphase follows it: the rows open in the order the room already knows at the scores they already knew, then the points count up and the rows climb or fall to their new places.close_questionalso builds the standings (score, points won, new rank, previous rank) and parks them in Redis state; every phase in between hands them on. The standings are the last beat before the next question, whichever side the explanation sits on. The last question skips it, the podium is the standings.get_host_statereturns the parked standings, so a reload mid-phase paints the settled board with no replay.TransitionGroupkeyed by nickname, so the re-sort is a real move.Spec:
specs/phase-12-scoreboard-screen.md.Testing
tests/test_engine.py: 31 green, covering the new phase either side of the explanation and the last-question skip. api/game_ux green.quizzly.localhostat 1920x1080 with ten players over five questions: the top five changed hands every round, host reload mid-standings came back settled, the last question went straight to the podium.