트럼프 카드 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>
|
||||
);
|
||||
}
|
||||
|
||||