트럼프 카드 J·Q·K·조커에 실제 카드 그림: Dmitry Fomin의 English pattern 그림카드 12장과 Atlas 조커 2장(Wikimedia Commons, CC0)을 그림 부분만 잘라 WebP 14장(약 250KB, 따로 받는 파일)으로 넣고, 그림카드는 왼쪽 위를 비운 테두리 안에 그려 큰 모서리 글자를 그대로 둠. 포커·원카드·구십구 규칙에 출처 한 줄, 게임 문서 §9 반영
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@@ -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<string, string> = { S: '♠', H: '♥', D: '◆', C: '♣' };
|
||||
const SUIT_KO: Record<string, string> = { S: '스페이드', H: '하트', D: '다이아', C: '클로버' };
|
||||
const RANK_LABEL: Record<string, string> = { T: '10', J: 'J', Q: 'Q', K: 'K', A: 'A' };
|
||||
@@ -74,28 +88,26 @@ export function PlayingCard({ card, size = 'md', selected, dimmed, highlight, on
|
||||
<Tag style={{ ...common, ...btnReset }} onClick={onClick} aria-label={title ?? cardAria(card)} aria-pressed={onClick ? !!selected : undefined} title={title}>
|
||||
<svg viewBox="0 0 100 140" width={w} height={h} aria-hidden>
|
||||
<rect x="1" y="1" width="98" height="138" rx="9" fill="#fffef9" stroke={selected ? '#2563eb' : '#9ca3af'} strokeWidth={selected ? 5 : 2} />
|
||||
<text x="9" y="33" fontSize="30" fontWeight="800" fill={color} fontFamily="Pretendard Variable, sans-serif">
|
||||
{label}
|
||||
</text>
|
||||
<text x="11" y="60" fontSize="26" fill={color}>
|
||||
{sym}
|
||||
</text>
|
||||
{joker ? (
|
||||
<text x="50" y="98" fontSize="22" fontWeight="800" textAnchor="middle" fill={color}>
|
||||
JOKER
|
||||
</text>
|
||||
<image href={courtSrc(card === 'X1' ? 'X1' : 'X2')} x="22" y="30" width="72" height="104" preserveAspectRatio="xMidYMid meet" />
|
||||
) : 'JQK'.includes(rank) ? (
|
||||
<>
|
||||
<rect x="30" y="44" width="56" height="78" rx="6" fill={color} opacity="0.1" />
|
||||
<text x="58" y="100" fontSize="44" fontWeight="800" textAnchor="middle" fill={color}>
|
||||
{rank}
|
||||
</text>
|
||||
{/* picture frame like a real court card, with a notch at top-left so the big index stays readable */}
|
||||
<image href={courtSrc(rank + suit)} x="10" y="5" width="80" height="130" preserveAspectRatio="xMidYMid slice" />
|
||||
<path d="M10 5H36V65H10Z" fill="#fffef9" />
|
||||
<path d="M36 5H90V135H10V65H36Z" fill="none" stroke={color} strokeOpacity="0.55" strokeWidth="1.2" />
|
||||
</>
|
||||
) : (
|
||||
<text x="60" y="108" fontSize="54" textAnchor="middle" fill={color}>
|
||||
{sym}
|
||||
</text>
|
||||
)}
|
||||
<text x="9" y="33" fontSize="30" fontWeight="800" fill={color} fontFamily="Pretendard Variable, sans-serif">
|
||||
{label}
|
||||
</text>
|
||||
<text x="11" y="60" fontSize="26" fill={color}>
|
||||
{sym}
|
||||
</text>
|
||||
</svg>
|
||||
</Tag>
|
||||
);
|
||||
|
||||
21
apps/web/src/components/cards/court/ATTRIBUTION.txt
Normal file
@@ -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 가 직접 그린다.
|
||||
BIN
apps/web/src/components/cards/court/JC.webp
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
apps/web/src/components/cards/court/JD.webp
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
apps/web/src/components/cards/court/JH.webp
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
apps/web/src/components/cards/court/JS.webp
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
apps/web/src/components/cards/court/KC.webp
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
apps/web/src/components/cards/court/KD.webp
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
apps/web/src/components/cards/court/KH.webp
Normal file
|
After Width: | Height: | Size: 21 KiB |
BIN
apps/web/src/components/cards/court/KS.webp
Normal file
|
After Width: | Height: | Size: 18 KiB |
BIN
apps/web/src/components/cards/court/QC.webp
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
apps/web/src/components/cards/court/QD.webp
Normal file
|
After Width: | Height: | Size: 19 KiB |
BIN
apps/web/src/components/cards/court/QH.webp
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
apps/web/src/components/cards/court/QS.webp
Normal file
|
After Width: | Height: | Size: 20 KiB |
BIN
apps/web/src/components/cards/court/X1.webp
Normal file
|
After Width: | Height: | Size: 6.8 KiB |
BIN
apps/web/src/components/cards/court/X2.webp
Normal file
|
After Width: | Height: | Size: 8.1 KiB |
@@ -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 }) {
|
||||
<p className="small muted">
|
||||
{o.turnSeconds === null ? '이 방은 시간 제한이 없어요. 다만 연결이 끊긴 채 오래 돌아오지 않으면' : '시간 안에 내지 않으면'} 합계가 가장 작아지는 카드를 자동으로 내요. 어린이와 할 때는 조커 0~99를 추천해요. 목숨(하트)은 이 판에서만 쓰는 표시예요.
|
||||
</p>
|
||||
{(!options || o.mode === 'classic') && <p className="small muted">{PLAYING_CARD_CREDIT}</p>}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -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}장 이상 쌓이면 파산해서 탈락해요.`}
|
||||
</p>
|
||||
{!classic && full.unoTargetScore > 0 && <p>여러 판을 해요. 이긴 사람은 다른 사람 손에 남은 카드 점수(숫자 그대로, 기능 카드 20점, 색 바꾸기 50점)를 얻고, {full.unoTargetScore}점에 먼저 닿으면 이겨요.</p>}
|
||||
{classic && <p className="small muted">{PLAYING_CARD_CREDIT}</p>}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -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 }) {
|
||||
) : (
|
||||
<p>시간 안에 고르지 않으면 걸린 칩이 없을 때는 체크, 있을 때는 포기로 처리돼요. 두 번 연속 시간을 넘기면 '자리 비움'이 되고 제한 시간이 짧아져요.</p>
|
||||
)}
|
||||
<p className="small muted">{PLAYING_CARD_CREDIT}</p>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -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장.
|
||||
|
||||
@@ -97,6 +97,7 @@ interface OldMaidState {
|
||||
- 오른쪽(휴대폰은 아래): 차례·타이머, 참가자(장수/등수), 최근 기록, 결과(등수와 도둑), 도움말.
|
||||
- 휴대폰 320px~: 자리 카드 2열, 카드 폭 44~50px(터치 44px 이상). 다크 모드는 공통 색 변수, 화면 읽기 프로그램용 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장 고르게, 짝 모두 버림, 조커 한 사람, 첫 사람이 한 장 더
|
||||
|
||||
@@ -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/조커면 맨 아래로 가고 일반 숫자 카드가 시작 카드가 된다.
|
||||
|
||||
@@ -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. 테스트 체크리스트
|
||||
|
||||
|
||||