diff --git a/apps/web/src/components/cards/PlayingCard.tsx b/apps/web/src/components/cards/PlayingCard.tsx index 3f2056b..ca01791 100644 --- a/apps/web/src/components/cards/PlayingCard.tsx +++ b/apps/web/src/components/cards/PlayingCard.tsx @@ -1,6 +1,20 @@ -/** Trump card drawn in SVG (no image assets). Big corner index for readability on PC and phones. */ +/** + * Trump card drawn in SVG. Big corner index for readability on PC and phones. Number cards and the back are drawn here; + * J/Q/K and the two jokers show real card artwork by Dmitry Fomin (Wikimedia Commons, CC0 — ./court/ATTRIBUTION.txt), + * bundled from our own origin as small WebP files that load only when such a card is on screen. + */ import type { CSSProperties } from 'react'; +/** Credit for the court/joker artwork (CC0 needs none, but we say thanks); shown in the rules of the games using these cards. */ +export const PLAYING_CARD_CREDIT = + '트럼프 그림카드(J·Q·K)·조커 그림: Dmitry Fomin — Wikimedia Commons "SVG English pattern playing cards", "Atlas deck joker", CC0 1.0(퍼블릭 도메인). 그림 부분만 잘라 작게 줄여 썼어요.'; + +/** + * URL of the court/joker picture ("JS".."KC", "X1" black joker, "X2" red joker). Vite turns this pattern into hashed + * /assets/ files; in tests it is just a file URL. + */ +export const courtSrc = (id: string): string => new URL(`./court/${id}.webp`, import.meta.url).href; + const SUIT_SYMBOL: Record = { S: '♠', H: '♥', D: '◆', C: '♣' }; const SUIT_KO: Record = { S: '스페이드', H: '하트', D: '다이아', C: '클로버' }; const RANK_LABEL: Record = { T: '10', J: 'J', Q: 'Q', K: 'K', A: 'A' }; @@ -74,28 +88,26 @@ export function PlayingCard({ card, size = 'md', selected, dimmed, highlight, on - - {label} - - - {sym} - {joker ? ( - - JOKER - + ) : 'JQK'.includes(rank) ? ( <> - - - {rank} - + {/* picture frame like a real court card, with a notch at top-left so the big index stays readable */} + + + ) : ( {sym} )} + + {label} + + + {sym} + ); diff --git a/apps/web/src/components/cards/court/ATTRIBUTION.txt b/apps/web/src/components/cards/court/ATTRIBUTION.txt new file mode 100644 index 0000000..dd085cb --- /dev/null +++ b/apps/web/src/components/cards/court/ATTRIBUTION.txt @@ -0,0 +1,21 @@ +트럼프 그림카드·조커 그림 출처 (Playing card court and joker artwork) + +JS JH JD JC / QS QH QD QC / KS KH KD KC .webp (J·Q·K 12장, 파일 이름 = 게임 엔진의 카드 id, 랭크+무늬) + +- 원본: Wikimedia Commons "Category:SVG English pattern playing cards" + https://commons.wikimedia.org/wiki/Category:SVG_English_pattern_playing_cards + File:English pattern jack of spades.svg ~ File:English pattern king of clubs.svg (2026-10-13 받음) +- 만든 사람: Dmitry Fomin (Дмитрий Фомин), https://commons.wikimedia.org/wiki/User:Dmitry_Fomin +- 라이선스: CC0 1.0 (퍼블릭 도메인 헌정, https://creativecommons.org/publicdomain/zero/1.0/) + +X1.webp (검은 조커), X2.webp (빨간 조커) + +- 원본: Wikimedia Commons + https://commons.wikimedia.org/wiki/File:Atlas_deck_joker_black.svg + https://commons.wikimedia.org/wiki/File:Atlas_deck_joker_red.svg (2026-10-13 받음) +- 만든 사람: Dmitry Fomin (Дмитрий Фомин) +- 라이선스: CC0 1.0 + +바꾼 점: 원본 SVG(360×540)를 4배로 그린 뒤 그림카드는 파란 테두리 안쪽 그림만, 조커는 광대 그림만 잘라 +(모서리 글자·러시아어 "ДЖОКЕР" 글자는 뺌) 높이 282px WebP(품질 80)로 줄이고, 흰 바탕을 카드 종이색(#fffef9)으로 칠했다. +CC0이라 출처 표시 의무는 없지만 고마움의 뜻으로 적어 둔다. 숫자 카드·뒷면·모서리 글자는 PlayingCard.tsx 가 직접 그린다. diff --git a/apps/web/src/components/cards/court/JC.webp b/apps/web/src/components/cards/court/JC.webp new file mode 100644 index 0000000..8057aa5 Binary files /dev/null and b/apps/web/src/components/cards/court/JC.webp differ diff --git a/apps/web/src/components/cards/court/JD.webp b/apps/web/src/components/cards/court/JD.webp new file mode 100644 index 0000000..c5eff1e Binary files /dev/null and b/apps/web/src/components/cards/court/JD.webp differ diff --git a/apps/web/src/components/cards/court/JH.webp b/apps/web/src/components/cards/court/JH.webp new file mode 100644 index 0000000..9a19b4a Binary files /dev/null and b/apps/web/src/components/cards/court/JH.webp differ diff --git a/apps/web/src/components/cards/court/JS.webp b/apps/web/src/components/cards/court/JS.webp new file mode 100644 index 0000000..1c59caa Binary files /dev/null and b/apps/web/src/components/cards/court/JS.webp differ diff --git a/apps/web/src/components/cards/court/KC.webp b/apps/web/src/components/cards/court/KC.webp new file mode 100644 index 0000000..c9d3544 Binary files /dev/null and b/apps/web/src/components/cards/court/KC.webp differ diff --git a/apps/web/src/components/cards/court/KD.webp b/apps/web/src/components/cards/court/KD.webp new file mode 100644 index 0000000..63bc897 Binary files /dev/null and b/apps/web/src/components/cards/court/KD.webp differ diff --git a/apps/web/src/components/cards/court/KH.webp b/apps/web/src/components/cards/court/KH.webp new file mode 100644 index 0000000..a229e1b Binary files /dev/null and b/apps/web/src/components/cards/court/KH.webp differ diff --git a/apps/web/src/components/cards/court/KS.webp b/apps/web/src/components/cards/court/KS.webp new file mode 100644 index 0000000..8d2fbef Binary files /dev/null and b/apps/web/src/components/cards/court/KS.webp differ diff --git a/apps/web/src/components/cards/court/QC.webp b/apps/web/src/components/cards/court/QC.webp new file mode 100644 index 0000000..7e2a252 Binary files /dev/null and b/apps/web/src/components/cards/court/QC.webp differ diff --git a/apps/web/src/components/cards/court/QD.webp b/apps/web/src/components/cards/court/QD.webp new file mode 100644 index 0000000..a448bf0 Binary files /dev/null and b/apps/web/src/components/cards/court/QD.webp differ diff --git a/apps/web/src/components/cards/court/QH.webp b/apps/web/src/components/cards/court/QH.webp new file mode 100644 index 0000000..5de0780 Binary files /dev/null and b/apps/web/src/components/cards/court/QH.webp differ diff --git a/apps/web/src/components/cards/court/QS.webp b/apps/web/src/components/cards/court/QS.webp new file mode 100644 index 0000000..7fca201 Binary files /dev/null and b/apps/web/src/components/cards/court/QS.webp differ diff --git a/apps/web/src/components/cards/court/X1.webp b/apps/web/src/components/cards/court/X1.webp new file mode 100644 index 0000000..429a42c Binary files /dev/null and b/apps/web/src/components/cards/court/X1.webp differ diff --git a/apps/web/src/components/cards/court/X2.webp b/apps/web/src/components/cards/court/X2.webp new file mode 100644 index 0000000..f9b8d3c Binary files /dev/null and b/apps/web/src/components/cards/court/X2.webp differ diff --git a/apps/web/src/games/ninety-nine/index.tsx b/apps/web/src/games/ninety-nine/index.tsx index 234beed..0787c27 100644 --- a/apps/web/src/games/ninety-nine/index.tsx +++ b/apps/web/src/games/ninety-nine/index.tsx @@ -4,7 +4,7 @@ import type { CardFace, CardKind, ChoiceView, HandCardView, LogEntry, NNOptions, import type { PublicUser } from '@bg/shared/lite'; import { Avatar } from '../../components/ui'; import { TurnTimer } from '../../components/TurnTimer'; -import { PlayingCard } from '../../components/cards/PlayingCard'; +import { PLAYING_CARD_CREDIT, PlayingCard } from '../../components/cards/PlayingCard'; import { haptic, noise, sfx, sounds, tone } from '../../lib/feedback'; import { bump, cssEsc, flyFrom, flyGhost, fxEl, seatEl, useBanner, useChange, useNewEntries } from '../card-fx'; import { useSeatRows } from '../../lib/seat-rows'; @@ -1021,6 +1021,7 @@ function Rules({ options }: { options?: NNOptions }) {

{o.turnSeconds === null ? '이 방은 시간 제한이 없어요. 다만 연결이 끊긴 채 오래 돌아오지 않으면' : '시간 안에 내지 않으면'} 합계가 가장 작아지는 카드를 자동으로 내요. 어린이와 할 때는 조커 0~99를 추천해요. 목숨(하트)은 이 판에서만 쓰는 표시예요.

+ {(!options || o.mode === 'classic') &&

{PLAYING_CARD_CREDIT}

} ); } diff --git a/apps/web/src/games/one-card/index.tsx b/apps/web/src/games/one-card/index.tsx index 5b85673..e58ceba 100644 --- a/apps/web/src/games/one-card/index.tsx +++ b/apps/web/src/games/one-card/index.tsx @@ -4,7 +4,7 @@ import type { Card, CardFace, Color, LogEntry, OneCardOptions, OneCardView, Seat import type { PublicUser } from '@bg/shared/lite'; import { Avatar, Sheet } from '../../components/ui'; import { TurnTimer, useServerNow } from '../../components/TurnTimer'; -import { PlayingCard } from '../../components/cards/PlayingCard'; +import { PLAYING_CARD_CREDIT, PlayingCard } from '../../components/cards/PlayingCard'; import { haptic, sounds, tone } from '../../lib/feedback'; import { useSeatRows } from '../../lib/seat-rows'; import type { BoardProps, GameUI, OptionsProps } from '../types'; @@ -1213,6 +1213,7 @@ function Rules({ options }: { options?: OneCardOptions }) { : `손에 ${full.bankruptLimit === 'auto' ? 20 : full.bankruptLimit}장 이상 쌓이면 파산해서 탈락해요.`}

{!classic && full.unoTargetScore > 0 &&

여러 판을 해요. 이긴 사람은 다른 사람 손에 남은 카드 점수(숫자 그대로, 기능 카드 20점, 색 바꾸기 50점)를 얻고, {full.unoTargetScore}점에 먼저 닿으면 이겨요.

} + {classic &&

{PLAYING_CARD_CREDIT}

} ); } diff --git a/apps/web/src/games/poker/index.tsx b/apps/web/src/games/poker/index.tsx index 40cd767..94b179e 100644 --- a/apps/web/src/games/poker/index.tsx +++ b/apps/web/src/games/poker/index.tsx @@ -4,7 +4,7 @@ import type { BetActionType, LegalBetView, LogEntry, PokerMode, PokerOptions, Po import type { PublicUser } from '@bg/shared/lite'; import { Avatar, ConfirmSheet, Sheet } from '../../components/ui'; import { TurnTimer } from '../../components/TurnTimer'; -import { PlayingCard } from '../../components/cards/PlayingCard'; +import { PLAYING_CARD_CREDIT, PlayingCard } from '../../components/cards/PlayingCard'; import { Chips, PlayChipNotice, formatChips } from '../../components/cards/Chips'; import { haptic, noise, sfx, sounds, tone } from '../../lib/feedback'; import { bump, cssEsc, flyFrom, flyGhost, fxEl, reducedMotion, seatEl, useBanner, useChange } from '../card-fx'; @@ -1242,6 +1242,7 @@ function Rules({ options }: { options?: PokerOptions }) { ) : (

시간 안에 고르지 않으면 걸린 칩이 없을 때는 체크, 있을 때는 포기로 처리돼요. 두 번 연속 시간을 넘기면 '자리 비움'이 되고 제한 시간이 짧아져요.

)} +

{PLAYING_CARD_CREDIT}

); } diff --git a/docs/games/ninety-nine.md b/docs/games/ninety-nine.md index 6194f0b..709b80d 100644 --- a/docs/games/ninety-nine.md +++ b/docs/games/ninety-nine.md @@ -248,6 +248,7 @@ interface GameResult { - 애니메이션: 합계 숫자가 올라가는 카운트 애니메이션, 방향 전환 화살표 회전, 탈락 때 아바타 흑백 처리, 목숨 하트가 깨지는 연출. - 초보 도움말: "99를 넘기면 안 돼요!" 한 줄 규칙과 특수 카드 표. 어린이 방 추천 설정(조커 0~99, 손패 5장). - 실시간 감각: 턴이 빨라서 타이머 링을 크게 보여 주고, 내 차례가 되면 진동(모바일 지원 시)으로 알린다. +- 카드 그림(2026-10-13): 숫자 카드·뒷면·큰 모서리 글자(숫자+무늬)는 `PlayingCard`가 직접 그리고, J·Q·K 12장과 조커 2장은 Dmitry Fomin의 실제 카드 그림(Wikimedia Commons "SVG English pattern playing cards", "Atlas deck joker", CC0 1.0)을 쓴다. 그림카드는 진짜 카드처럼 테두리 안에 그림을 넣고 왼쪽 위만 비워 큰 모서리 글자가 잘 보이게 했다. 원본 SVG에서 그림 부분만(조커는 광대만) 잘라 높이 282px WebP 14장(합계 약 250KB)으로 줄였고, 그 카드가 화면에 나올 때만 따로 받는다. 출처는 `apps/web/src/components/cards/court/ATTRIBUTION.txt`, 규칙 보기 맨 아래 작은 글씨(`PLAYING_CARD_CREDIT`, 방에서는 트럼프 카드 모드 `classic`일 때만). ## 10. 테스트 체크리스트 - [ ] 덱 구성: `kr-product` 기본값 91장(1~8 각 7, 10이 21, ±9/±10/0 각 4, 조커 2). `specialCounts=2`면 85장. `classic` 52장, 7인 이상 `auto`면 104장. diff --git a/docs/games/old-maid.md b/docs/games/old-maid.md index 714ed99..b984be9 100644 --- a/docs/games/old-maid.md +++ b/docs/games/old-maid.md @@ -97,6 +97,7 @@ interface OldMaidState { - 오른쪽(휴대폰은 아래): 차례·타이머, 참가자(장수/등수), 최근 기록, 결과(등수와 도둑), 도움말. - 휴대폰 320px~: 자리 카드 2열, 카드 폭 44~50px(겹친 부채에서도 눌리는 띠 28px 이상, 높이 70px). 다크 모드는 공통 색 변수, 화면 읽기 프로그램용 aria-label과 aria-live 안내. - 컴퓨터 상대: 단계와 관계없이 무작위로 한 장 뽑고, 가끔(15%, 차례마다 한 번까지) 자기 손패를 먼저 섞는다. 생각 시간은 방의 공통 "사람 같은 지연". +- 카드 그림(2026-10-13): 숫자 카드·뒷면·큰 모서리 글자(숫자+무늬)는 `PlayingCard`가 직접 그리고, J·Q·K 12장과 조커 2장은 Dmitry Fomin의 실제 카드 그림(Wikimedia Commons "SVG English pattern playing cards", "Atlas deck joker", CC0 1.0)을 쓴다. 그림카드는 진짜 카드처럼 테두리 안에 그림을 넣고 왼쪽 위만 비워 큰 모서리 글자가 잘 보이게 했다. 원본 SVG에서 그림 부분만(조커는 광대만) 잘라 높이 282px WebP 14장(합계 약 250KB)으로 줄였고, 그 카드가 화면에 나올 때만 따로 받는다. 출처는 `apps/web/src/components/cards/court/ATTRIBUTION.txt`. ## 10. 테스트 체크리스트 - [x] 2~8명 셋업: 53장 고르게, 짝 모두 버림, 조커 한 사람, 첫 사람이 한 장 더 diff --git a/docs/games/one-card.md b/docs/games/one-card.md index 6e7772d..cb15d3f 100644 --- a/docs/games/one-card.md +++ b/docs/games/one-card.md @@ -330,6 +330,7 @@ interface GameResult { - 처음 몇 판은 "힌트" 토글로 낼 수 있는 카드 이유를 보여 준다(예: "♥ 무늬가 같아요"). - 공격받을 때 "막을 수 있는 카드: ♣2, 조커" 같은 안내 문구를 띄운다. - 접근성: 무늬는 색과 모양을 같이 쓴다(♥♦ 빨강, ♠♣ 검정). `uno-style` 색 카드에는 색맹 대비용 무늬 패턴(점·줄·격자·물결)과 색 이름 글자를 함께 넣는다. +- 카드 그림(2026-10-13): 숫자 카드·뒷면·큰 모서리 글자(숫자+무늬)는 `PlayingCard`가 직접 그리고, J·Q·K 12장과 조커 2장은 Dmitry Fomin의 실제 카드 그림(Wikimedia Commons "SVG English pattern playing cards", "Atlas deck joker", CC0 1.0)을 쓴다. 그림카드는 진짜 카드처럼 테두리 안에 그림을 넣고 왼쪽 위만 비워 큰 모서리 글자가 잘 보이게 했다. 원본 SVG에서 그림 부분만(조커는 광대만) 잘라 높이 282px WebP 14장(합계 약 250KB)으로 줄였고, 그 카드가 화면에 나올 때만 따로 받는다. 출처는 `apps/web/src/components/cards/court/ATTRIBUTION.txt`, 규칙 보기 맨 아래 작은 글씨(`PLAYING_CARD_CREDIT`, 방에서는 트럼프 카드 모드 `classic`일 때만). ## 10. 테스트 체크리스트 - [ ] 셋업: 같은 시드면 같은 손패와 시작 카드가 나온다. 시작 카드가 2/A/7/J/Q/K/3/조커면 맨 아래로 가고 일반 숫자 카드가 시작 카드가 된다. diff --git a/docs/games/poker.md b/docs/games/poker.md index 3166ba6..911f329 100644 --- a/docs/games/poker.md +++ b/docs/games/poker.md @@ -624,6 +624,7 @@ interface PokerResult /* extends GameResult */ { - "규칙 보기": 모드별 1쪽 요약 + 족보표(그림 예시). 한국식 베팅 용어 설명(삥/따당/하프). - 첫 핸드에서 말풍선 튜토리얼(끌 수 있음). 내 차례에 진동/소리(설정에서 끄기), 남은 시간 원형 게이지, 5초 남으면 빨간색. - 접근성: 무늬는 색 + 모양 + 글자(♠ 검정, ◆ 파랑, ♥ 빨강, ♣ 초록 4색 덱 옵션)로 구분, 큰 글씨 모드. +- 카드 그림(2026-10-13): 숫자 카드·뒷면·큰 모서리 글자(숫자+무늬)는 `PlayingCard`가 직접 그리고, J·Q·K 12장과 조커 2장은 Dmitry Fomin의 실제 카드 그림(Wikimedia Commons "SVG English pattern playing cards", "Atlas deck joker", CC0 1.0)을 쓴다. 그림카드는 진짜 카드처럼 테두리 안에 그림을 넣고 왼쪽 위만 비워 큰 모서리 글자가 잘 보이게 했다. 원본 SVG에서 그림 부분만(조커는 광대만) 잘라 높이 282px WebP 14장(합계 약 250KB)으로 줄였고, 그 카드가 화면에 나올 때만 따로 받는다. 출처는 `apps/web/src/components/cards/court/ATTRIBUTION.txt`, 규칙 보기 맨 아래 작은 글씨(`PLAYING_CARD_CREDIT`). ## 10. 테스트 체크리스트