Add briscola: classic two-player and briscola a quattro
CI / Build and push docker image (push) Successful in 1m45s
CI / Build and push docker image (push) Successful in 1m45s
New tavolo-briscola distribution implementing briscola on the platform: - pure rules (state.py, engine.py): 3-card deals, a face-up trump that is the last card drawn, trump-first trick resolution (A > 3 > K > H > J > 7 > 6 > 5 > 4 > 2), 120 points per deal, 60-60 patta re-deals, a configurable target score (default 61), deal-end acknowledgements and turn auto-play; - BriscolaEngine (briscola, 2 players) and BriscolaQuattroEngine (briscola_a_quattro, 4 players in fixed partnerships) adapters; - registered in tavolo-app, packaged in the Docker image, documented. Platform fixes surfaced by a two-player lobby: - the websocket state and snapshot payloads now carry seats_open (they were only in the REST lobby payload), so lobbies with player counts other than four render correctly; seats_open is clamped at zero; - the web client logs unparseable server messages instead of silently dropping them. Web client: briscola table for both variants (stock, face-up trump, trick, last-trick banner), deal summary modal and game-over overlay. Tests: tavolo-briscola rules/adapter suites, app integration tests (lobby, websocket play, turn timeout, deal-end acks, persistence), a platform seats_open test and frontend model parsing tests.
This commit is contained in:
+67
-1
@@ -1,4 +1,4 @@
|
||||
/* Scopone scientifico frontend — game table, cards and scoring summary.
|
||||
/* tavolo frontend — game tables, cards and scoring summaries.
|
||||
*
|
||||
* The felt palette and the Bootstrap theme overrides live in theme.css,
|
||||
* which is loaded before this file. */
|
||||
@@ -474,3 +474,69 @@ body {
|
||||
font-size: 1.25rem;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
/* ---------- briscola ---------- */
|
||||
|
||||
.briscola-badge {
|
||||
background: var(--panel-light);
|
||||
color: var(--accent);
|
||||
font-weight: 700;
|
||||
border-radius: 999px;
|
||||
padding: 0.15rem 0.6rem;
|
||||
border: 1px solid var(--accent);
|
||||
}
|
||||
|
||||
/* The face-down stock with the face-up trump card beside it. */
|
||||
.stock {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.75rem;
|
||||
}
|
||||
|
||||
.stock-pile {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.playing-card.stock-card {
|
||||
height: 48px;
|
||||
margin-left: -34px;
|
||||
}
|
||||
|
||||
.playing-card.stock-card:first-child {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.playing-card.briscola-card {
|
||||
height: 64px;
|
||||
outline: 2px solid var(--accent);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
.stock-count {
|
||||
color: var(--muted);
|
||||
font-size: 0.8rem;
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
|
||||
/* Current-trick cards with the player's name above each. */
|
||||
.trick-slot {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 0.15rem;
|
||||
}
|
||||
|
||||
.trick-name {
|
||||
font-size: 0.7rem;
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
/* Two-player table: opponent on top, player at the bottom. */
|
||||
.table-grid.duo {
|
||||
grid-template-columns: 1fr;
|
||||
grid-template-rows: auto 1fr auto;
|
||||
grid-template-areas:
|
||||
"top"
|
||||
"center"
|
||||
"bottom";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user