:카드/설명문서

위키백과, 우리 모두의 백과사전.

기본[편집]

랭크[편집]

52매의 덱[편집]

통상의 52매의 트럼프의 카드:

56매의 덱[편집]

56매의 트럼프의 카드:

  • {{Cards|kn}} 또는 {{Cards|n}} = Kn (표준의 56매의 트럼프의 나이트)
  • {{Cards|1}} = 1 (표준의 56매의 트럼프)
  • {{Cards|11}} = 11 (표준적이지 않은 56매의 트럼프)

조커[편집]

「r」로 붉은 조커, 「b」로 검은 조커:

  • {{Cards|Jkrr}} = Jkr(red)
  • {{Cards|Jkrb}} = Jkr(black)

매개변수 「rank_name」및「suit_name」으로 지정하는 것도 가능(자세한 것은 후술의 「어려운 사용법」을 참조):

  • {{Cards|Jkrr|rank_name=full|suit_name=full}} = Joker (red)
  • {{Cards|Jkrb|rank_name=full|suit_name=full}} = Joker (black)

?[편집]

불명의 랭크를 지정하기 위한 심볼:

커스터마이즈 된 카드[편집]

「카드」로 어떤 문자열이라도 지정하는 것이 가능하다. 예: {{Cards|Cd}} = C, {{Cards|Vs}} = V, {{Cards|€h}} = , {{Cards|구c}} =

「s·h·d·c·r·b」(대소 문자는 구별하지 않는다)의 하나, 또는 「♠·♥·♦·♣」의 하나로 끝나 있는 경우, 그 문자는 슈트를 나타내는 것으로 간주해진다. 「&」을 이스케이프 문자로서 사용하는 것도 가능하다. 예: {{Cards|R&}} = R, {{Cards|Joker&}} = Joker, {{Cards|♥♥&}} = ♥♥

문자열이 「a·k·q·kn·j·jkr·x」의 하나로 시작되어 있는 경우, 최초의 문자는 대문자화 된다. 대문자화를 막으려면, <span></span>로 묶는다:{{Cards|<span>k</span>s}} = k

슈트[편집]

복합[편집]

  • {{Cards|Ac|Kd|Ts|2h}} 또는 {{Cards|A♣|K♦|10♠|2♥}} = A K 10 2
  • 랭크만 있고 슈트가 없다:{{Cards|A|K|T|2}} = A K 10 2
  • 슈트의 심볼만:{{Cards|c|d|s|h}} or {{Cards|♣|♦|♠|♥}} =    

그 외의 사용법[편집]

정의 끝난 문자열 「a·k·q·kn·j·jkr·x」 및 「s·h·d·c·r·b」는 대문자와 소문자를 구별하지 않는다.

기본적인, 이름이 없는 (카드의) 수치 매개변수는 1에서 15까지의 범위에 없으면 안 된다.

어려운 사용법[편집]

전 매개변수의 설명[편집]

{{Cards
| <!-- first card's rank and/or suit,
as described above in the "Basic" section -->
| <!-- second card --><!--
... 15 max. -->
| separator = 
| sortable = <!-- "yes" or anything else -->
| rankname = <!-- "full" or anything else -->
| suitname = <!-- "full" or "letter" or anything else -->
| hand_style = 
| spades_color = 
| hearts_color = 
| diamonds_color = 
| clubs_color = 
| card_style = <!--
| use_image = -->
}}
정렬
Q
K
10
?
1
A
Jkr
2
9
5
11
Kn
J
정렬
(black)
(red)
정렬
10
J
4
J
Jkr(black)
J
A
Jkr(red)
K
J
J(red)
J
정렬
10 10
J J
4 Jkr(black)
Jack of heartJack of heart
J Jkr(red)
4 7
J K(black)
7 4
J Kn
J
Jack 6
Jack Jack(black)
J J
K A
K 3

어느 매개변수든 필수는 아니다.

  • separator: 카드와 카드를 분리하는 문자열. 기본은 줄 바꿈 없는 공백 (&nbsp;)
  • sortable: 「yes」 또는 그 이외를 지정한다
    • yes: 랭크와 슈트의 순위를 정렬할 수 있도록 숨은 키를 설정한다. 카드는 높은 것부터 순서대로: Jkr, A, K, Q, Kn, J, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1 그 이외의 순서에 줄선다. 슈트는 높은 것부터 순서대로: ♠, ♥, ♦, ♣, red, black, 슈트 없음의 순서에 줄선다. 주의: 이 기능은 최초의 카드의 랭크, 2매째의 랭크 … … 를 볼 뿐이므로, 하나의 틀이 2매 이상의 카드를 포함할 때는 카드의 실제의 가치를 반영하지 않을 가능성이 있다
    • 그 이외(빈 매개변수 또는 매개변수를 지정하지 않는 경우를 포함한다): 기본, 정렬 키를 생성하지 않는다
  • rank_name: 「full」 또는 그 이외를 지정한다
    • full: 랭크명을 풀네임으로 표시한다: "Joker", "Ace", "King", "Queen", "Knight", "Jack", "11", "10", "9"……
    • 그 이외(빈 매개변수 또는 매개변수를 지정하지 않는 경우를 포함한다):기본, 통상의 생략한 랭크명: "Jkr", "A", "K", "Q", "Kn", "J", "11", "10", "9"……
  • suit_name: 「full」·「letter」·그 이외
    • full: 스페이스에 이어 슈트의 풀네임을 표시한다: " of spade", " of heart", " of diamond", " of club", " (red)", " (black)". 슈트의 풀네임을 사용했을 경우, 랭크도 풀네임으로 하고, 사이를 반점이나 스페이스(줄 바꿈 없는 공백「&nbsp;」을 사용할 필요가 있다)로 단락짓는 것이 보통이겠지만, 그렇게 하려면 이하와 같이 쓴다: {{Cards|Ac|Kd|10s|2h|separator=,&nbsp;|rank_name=full|suit_name=full}} = Ace of clubKing of diamond10 of spade2 of heart
    • letter: 슈트명을 알파벳 1문자로 기록한다: "s", "h", "d", "c", "r", "b"
    • 그 이외(빈 매개변수 또는 매개변수를 지정하지 않는 경우를 포함한다):기본, 보통 슈트명: "", "", "", "", "(red)", "(black)"
  • hand_style: 포커 핸드용의 CSS 스타일 <b style="" class="pokerhands"></b>
  • spades_color, hearts_color, diamonds_color, clubs_color: 각 슈트의 카드용의 색(CSS의 색, 「#FFFFFF」혹은 「white」). 통상은 검정과 빨강이지만, 이 매개변수를 사용하는 것에 의해서, 4색 덱을 실현할 수 있다: {{Cards|Ac|Kd|10s|2h|diamonds_color=blue|clubs_color=green}} = A K 10 2
  • card_style: 각 카드용의 CSS 스타일 <span style="" class="playingcards"></span>
  • use_image: (미실장) 카드를 나타내는 화상

HTML·클래스명·CSS[편집]

이 틀에 의해서 생성되는 HTML 마크 업은 마이크로 포맷을 포함하고 있어 "pokerhands", "playingcards", "spades", "hearts", "diamonds", "clubs", "cardranks", "cardsuits" 같은 클래스명을 포함하고 있으므로, 계산기로 해석이 가능하게 되어 있다.

예를 들면 {{Cards|Ac|10♥|Knd|?|J|s}}A 10 Kn ? J  를 생성해, 그 HTML 마크 업은 이하와 같이 된다.

<!-- sortable hidden key, if needed, is inserted before <b /> and is like:
<span class="sortkey" style="display:none;">&140&10&100&30&115&20&000&00&110&00&105&40</span> -->
<b style="" class="pokerhands"><!-- value of 'hand_style', if exists, is added here inside 'style=""' -->
	<span style="color:black;" class="playingcards clubs"><!-- 'black' will changed to 'clubs_color''s value if defined;
'card_style''s value, if exists, is added here inside 'style=""', and after the color value;
same things apply to below ones -->
		<span class="cardranks">A</span><span class="cardsuits">&clubs;</span>
	</span>&nbsp;<!-- &nbsp; will be replaced by user defined 'separator' if there is one;
same thing applys to below ones -->
	<span style="color:red;" class="playingcards hearts">
		<span class="cardranks">10</span><span class="cardsuits">&hearts;</span>
	</span>&nbsp;
	<span style="color:red;" class="playingcards diamonds">
		<span class="cardranks">Kn</span><span class="cardsuits">&diams;</span>
	</span>&nbsp;
	<span style="" class="playingcards"><!-- 'card_style''s value, if exists, is added here inside 'style=""';
same thing applys to below one -->
		<span class="cardranks">?</span>
	</span>&nbsp;
	<span style="" class="playingcards">
		<span class="cardranks">J</span>
	</span>&nbsp;
	<span style="color:black;" class="playingcards spades">
		<span class="cardsuits">&spades;</span>
	</span>
</b>

트럼프용의 틀은 표준적인 슈트 색에 맞추어 자동적으로 적·흑의 색을 칠한다. 그 이외의 색을 사용하고 싶은 경우에는, 이하의 CSS를 유저 스타일 시트에 추가하는 것.

/* Standard four-color deck */
.diamonds { color: blue !important }
.clubs { color: green !important }

개발자용 링크[편집]

같이 보기[편집]