From 8e549a72c31837ac59635d7ede6afeaa27103d9a Mon Sep 17 00:00:00 2001 From: EJClaw Date: Sat, 17 Oct 2026 00:33:34 +0900 Subject: [PATCH] =?UTF-8?q?=EC=84=AF=EB=8B=A4:=20=ED=99=94=ED=88=AC=20?= =?UTF-8?q?=EC=9B=94=20=EC=88=AB=EC=9E=90=EB=A5=BC=20=EC=99=BC=EC=AA=BD=20?= =?UTF-8?q?=EC=95=84=EB=9E=98=EC=97=90=20=ED=81=AC=EA=B2=8C(=ED=9D=B0=20?= =?UTF-8?q?=EA=B8=80=EC=94=A8=20+=20=EA=B2=80=EC=9D=80=20=ED=85=8C?= =?UTF-8?q?=EB=91=90=EB=A6=AC)=20=ED=91=9C=EC=8B=9C,=20=EA=B2=B9=EC=B9=9C?= =?UTF-8?q?=20=EC=83=81=EB=8C=80=20=EC=B9=B4=EB=93=9C=EC=97=90=EC=84=9C?= =?UTF-8?q?=EB=8F=84=20=EB=B3=B4=EC=9D=B4=EA=B2=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit HwatuCard에 monthStyle='corner' 추가(기본 'badge'는 고스톱 등 그대로). 상대 자리 카드는 다음 카드가 오른쪽 30%를 덮어 오른쪽 위 배지가 가려졌는데, 왼쪽 아래 숫자는 겹쳐도 보인다. Co-Authored-By: Claude Opus 5.5 --- apps/web/src/components/cards/HwatuCard.tsx | 37 +++++++++++++++++++-- apps/web/src/games/seotda/board.tsx | 7 ++-- apps/web/src/games/seotda/quick.tsx | 4 +-- 3 files changed, 41 insertions(+), 7 deletions(-) diff --git a/apps/web/src/components/cards/HwatuCard.tsx b/apps/web/src/components/cards/HwatuCard.tsx index fcefb5e..592bd43 100644 --- a/apps/web/src/components/cards/HwatuCard.tsx +++ b/apps/web/src/components/cards/HwatuCard.tsx @@ -1,7 +1,8 @@ /** * Hwatu card: the real 48-card hwatu artwork from Wikimedia Commons "SVG Hwatu" (Marcus Richert after Louie Mantia Jr., * CC BY-SA 4.0 — ./hwatu/ATTRIBUTION.txt, docs/games/seotda.md "화투 그림"), bundled from our own origin (no external - * URLs). A small month badge stays on top so beginners can read the card at a glance; + * URLs). A small month badge stays on top so beginners can read the card at a glance (섯다 instead draws a big outlined + * number in the bottom-left corner, which stays visible when cards overlap); * 쌍피 / bonus cards get their value tag (고스톱). The back and the bonus cards are drawn here. */ import type { CSSProperties } from 'react'; @@ -70,6 +71,15 @@ function BonusFace({ w, h, value }: { w: number; h: number; value: number }) { ); } +/** Dark outline around white text (8 directions + soft shadow), readable on both the white and black parts of a card. */ +const cornerOutline = (t: number): string => + [ + [-t, -t], [0, -t], [t, -t], [-t, 0], [t, 0], [-t, t], [0, t], [t, t], + ] + .map(([x, y]) => `${x}px ${y}px 0 #111827`) + .concat('0 1px 3px rgba(0,0,0,0.6)') + .join(', '); + export function HwatuCard({ card, size = 'md', @@ -78,6 +88,7 @@ export function HwatuCard({ dimmed, highlight, showMonth = true, + monthStyle = 'badge', onClick, className, style, @@ -91,6 +102,8 @@ export function HwatuCard({ highlight?: boolean; /** Small month number badge (on by default). */ showMonth?: boolean; + /** 'badge': small dark circle top-right. 'corner': big white outlined number bottom-left (섯다). */ + monthStyle?: 'badge' | 'corner'; onClick?: () => void; className?: string; style?: CSSProperties; @@ -142,7 +155,27 @@ export function HwatuCard({ ) : ( )} - {showMonth && card.month > 0 && ( + {showMonth && card.month > 0 && monthStyle === 'corner' && ( + + {card.month} + + )} + {showMonth && card.month > 0 && monthStyle === 'badge' && ( {seat.cards.map((c, i) => isCard(c) ? ( - + ) : ( ), @@ -298,6 +298,7 @@ function MySeat({ seat, view: v, players, deadline, winner, setRef, phone }: { s key={c.key} card={c} width={w} + monthStyle="corner" className="anim-deal" highlight={!!v.myChosen?.includes(c.id) || (!v.myChosen && v.myOpened === c.id)} dimmed={(!!v.myChosen && !v.myChosen.includes(c.id)) || seat.folded} @@ -566,7 +567,7 @@ function OpenBox({ view: v, me, act, pending }: { view: SeotdaView; me: string;

{cards.map((c) => ( - setPick(c.id)} /> + setPick(c.id)} /> ))}