Files
waving-hands/src/lib/game/glyphs.ts
T
Eric WagonerandClaude Fable 5.1 865555e911 Waving Hands: a browser duel after Bartle's 1977 game
SvelteKit 5 single-player version against a heuristic bot. The engine
resolves all forty spells simultaneously as the rules describe, the
ledger of gestures is the interface, and the duel is saved in the
browser. Tester feedback rounds added per-hand planning, threat
evidence, a result strip with one-time rule explanations, a phone
layout and a structured rules page. Deploys as a static site behind
Caddy.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-22 15:33:29 -04:00

21 lines
487 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import type { Gesture } from './spells';
/** How a gesture is written in the ledger. A clap needs both hands; alone it is nothing. */
export function glyph(g: Gesture, other: Gesture = 'C'): string {
if (g === '>') return '†';
if (g === '-') return '–';
if (g === 'C' && other !== 'C') return '(C)';
return g;
}
export const GESTURE_SHORT: Record<Gesture, string> = {
F: 'fingers',
P: 'palm',
S: 'snap',
W: 'wave',
D: 'digit',
C: 'clap',
'>': 'stab',
'-': 'nothing'
};