tighten spec: bingo grid ordering, jury rounding, prediction constraints
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -215,7 +215,7 @@ All values in `packages/server/data/scoring.json`, editable without code changes
|
||||
}
|
||||
```
|
||||
|
||||
**Jury scoring formula:** Each round, the group average rating is computed. A player's jury points for that round = `jury_max_per_round - abs(player_rating - group_average)`, clamped to a minimum of 0. This rewards voting with the group consensus.
|
||||
**Jury scoring formula:** Each round, the group average rating is computed. A player's jury points for that round = `jury_max_per_round - Math.round(abs(player_rating - group_average))`, clamped to a minimum of 0. This rewards voting with the group consensus.
|
||||
|
||||
**Prediction scoring:** Resolved after the actual ESC results are known. The host enters the actual results into the Host tab during/after Act 3 via a dedicated "Enter Results" form: winner, 2nd place, 3rd place, and last place finisher. The server compares each player's predictions against these actual results and calculates scores. This triggers the dramatic final leaderboard reveal on the display.
|
||||
|
||||
@@ -257,7 +257,7 @@ PostgreSQL via Drizzle ORM. Lightweight — most queries are "get everything for
|
||||
- `player_id` (FK → players)
|
||||
- `room_id` (FK → rooms)
|
||||
- `predicted_winner` (varchar, country code)
|
||||
- `top_3` (jsonb, array of country codes)
|
||||
- `top_3` (jsonb, array of country codes — must not include predicted_winner, enforced in application logic)
|
||||
- `nul_points_pick` (varchar, country code)
|
||||
|
||||
**jury_rounds**
|
||||
@@ -277,7 +277,7 @@ PostgreSQL via Drizzle ORM. Lightweight — most queries are "get everything for
|
||||
- `id` (uuid, PK)
|
||||
- `player_id` (FK → players)
|
||||
- `room_id` (FK → rooms)
|
||||
- `squares` (jsonb, array of { tropeId, tapped })
|
||||
- `squares` (jsonb, positionally ordered array of { tropeId, tapped } — index 0-15 maps left-to-right, top-to-bottom on the 4×4 grid)
|
||||
|
||||
**dishes**
|
||||
- `id` (uuid, PK)
|
||||
|
||||
Reference in New Issue
Block a user