anvilsign in

collin/mahjong

1import type { ClaimType } from '../game/engine';
2
3/**
4 * Bilingual label: the Chinese term players call at the table, with the English
5 * underneath for anyone still learning it. Tile faces stay pure Chinese — those
6 * are the tiles themselves, not UI chrome.
7 */
8export function Bi({ zh, en, sub }: { zh: string; en: string; sub?: string }) {
9 return (
10 <span className="bi">
11 <span className="zh">{zh}</span>
12 <span className="en">{en}</span>
13 {sub && <span className="bi-sub">{sub}</span>}
14 </span>
15 );
16}
17
18export const CLAIM_LABEL: Record<ClaimType, [string, string]> = {
19 hu: ['胡', 'Win'],
20 kong: ['槓', 'Kong'],
21 pung: ['碰', 'Pung'],
22 chow: ['吃', 'Chow'],
23};