hanabi: lay the 2D board out as a table, not a stack #16

Merged
joeyr merged 1 commit from hanabi-board-layout into main 2026-08-16 23:41:50 -05:00
Owner

Absolute positioning instead of one overflowing VerticalLayout; hands flanking a centred play area; discard grid; big status numbers.

The overflow was the real bug: children with no preferred size were being silently shrunk to zero, which is why the status lines never appeared.

Absolute positioning instead of one overflowing VerticalLayout; hands flanking a centred play area; discard grid; big status numbers. The overflow was the real bug: children with no preferred size were being silently shrunk to zero, which is why the status lines never appeared.
hanabi: lay the 2D board out as a table, not a stack
All checks were successful
lint / lua (pull_request) Successful in 18s
a0e3476fc7
The board worked and read as a form: one VerticalLayout, everything in a
column, hands stacked above the buttons. Two problems, one cosmetic and one
not.

The one that mattered: the column's contents were taller than the panel, and
Unity's layout groups absorb overflow by shrinking whichever children have no
preferred size. The three status lines had none, so the clue/fuse/deck counts,
the turn line and the discard list were squeezed to zero height while the rows
with explicit heights survived. Nothing errored, nothing logged, and the board
looked merely sparse rather than broken.

So the board is now placed absolutely: fixed-size panels anchored to its upper
left, with make_ui.py checking the arithmetic. An element that does not fit now
hangs off the edge, which is a bug you can see, and the generator refuses to
emit one.

The layout itself follows the reference: hands flank the play area in two
columns, the fireworks sit centred and are the largest thing on the board, and
deck/clues/fuses/score are four big numbers rather than one line of prose.
Hands cannot sit where their players do, since "opposite me" differs per viewer
and there is one XML tree, so the script assigns seats to blocks in turn order,
filling the left column then the right. Four players get two and two rather
than four beside nothing.

The discard list becomes a grid of every suit and rank, showing how many copies
are gone and reddening a cell when the last one is. A pile of overlapping cards
hides exactly what it gets consulted for; the grid answers "can this stack still
be finished" without being read.

Harness extended to cover the block mapping at every table size and to check the
grid against the pile it summarises: 300 seeds green, plus the 945 rules
assertions.
joeyr merged commit 7841c59062 into main 2026-08-16 23:41:50 -05:00
joeyr referenced this pull request from a commit 2026-08-16 23:41:51 -05:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
joeyr/tts-games!16
No description provided.