The Peanut Gallery and table talk

A room's link without a seat is now a place in the gallery: a tokenless
view that withholds any gesture hidden from anyone at the table, counted
for the table and the lobby. Seated wizards can talk; each line is a
ledger line, shown in the rail and in the lobby, and the hall counts
what was said while you were away. The hall's pitch no longer says two
wizards.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0141G6xqLeNRYEtviLWSB5Up
This commit is contained in:
Eric WagonerandClaude Fable 5.1 committed 2026-09-23 09:50:06 -04:00
1 parent 75c2dc9241
commit 8e7376d59a
19 files changed
+488 -80

No files matched your search

+32
View File
@@ -0,0 +1,32 @@
import { describe, expect, it } from 'vitest';
import { SPECTATOR, createGame } from './state';
import { viewFor } from './view';
/** Three wizards; B's first gestures were hidden from C alone. */
function tableWithASecret() {
const s = createGame({ A: 'Aldric', B: 'Bryn', C: 'Cass' }, 1);
s.wizards.B.history.push({ left: 'P', right: 'S', turn: 0, phase: 'main', hiddenFrom: ['C'] });
s.log.push({ turn: 0, kind: 'gesture', text: 'Bryn: left proffered palm, right snap.', hiddenFrom: ['C'] });
s.log.push({ turn: 0, kind: 'info', text: 'Nothing else happened.' });
return s;
}
describe('the view a room sends', () => {
it('shows a hidden gesture to the wizards who could see it', () => {
const view = viewFor(tableWithASecret(), 'A');
expect(view.wizards.B.history[0].left).toBe('P');
expect(view.log).toHaveLength(2);
});
it('withholds it from the wizard it was hidden from', () => {
const view = viewFor(tableWithASecret(), 'C');
expect(view.wizards.B.history[0].left).toBe('-');
expect(view.log.map((l) => l.text)).toEqual(['Nothing else happened.']);
});
it('withholds from the gallery anything hidden from anyone', () => {
const view = viewFor(tableWithASecret(), SPECTATOR);
expect(view.wizards.B.history[0].left).toBe('-');
expect(view.log.map((l) => l.text)).toEqual(['Nothing else happened.']);
});
});