Commit 483275d
Claude
feat(#616): auction the hot seat instead of assigning it
Once per game, at a randomly drawn round, the chair is sold rather than
handed to whoever is last. Everyone bids in secret; the highest bid answers
one question alone while the rest of the room may stake points on the
outcome.
Bids are a SHARE of the bidder's own score, never an absolute number of
points. This is the decision the mode stands on: in points the auction
always goes to whoever is already ahead, which inverts the comeback lever
the issue was opened for. In percent everyone can commit everything, so the
chair goes to whoever risks the most rather than whoever holds the most —
and it is cheapest for the player in last place. It also matches how the
wager finale already stakes (player.py:84), so the game gains no second
notion of "an amount you put down".
Settlement is symmetric, like the finale. Unlike the finale, an unanswered
question still costs the stake: the chair was bought either way, and "bid,
then let the clock run out" would otherwise be free — which is what any
sleeping phone does on its own, no bad intent required. #653 brings the
finale in line so this ends up being one rule rather than two.
A bid must also cost something. A player on zero points bidding 100% would
be the highest bid in the room at a stake of nothing: they would win
nothing, lose nothing, and the only effect would be that nobody else gets
the chair. Found by a test that was checking something else.
Implementation follows the Lightning Round exactly — rules in a synchronous
game/hot_seat.py, three phases, and one loop in the WS layer. The auction
never draws the round Lightning already owns, and it reserves the main
game's queued questions the same way (#544).
Off in the kids preset, for the same family of reasons Lightning is: losing
points is the mechanic children like least.
67 new tests, suite 2175.1 parent 8c2a73d commit 483275d
19 files changed
Lines changed: 2547 additions & 13 deletions
File tree
- custom_components/quizify
- game
- server
- www
- i18n
- js
- scripts
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
6 | 18 | | |
7 | 19 | | |
8 | 20 | | |
| |||
0 commit comments