틀:카드
기본[편집]
랭크[편집]
52매의 덱[편집]
통상의 52매의 트럼프의 카드:
{{Cards|A}}
,{{Cards|K}}
,{{Cards|Q}}
,{{Cards|J}}
= , , ,{{Cards|10}}
or{{Cards|T}}
={{Cards|9}}
-{{Cards|2}}
= -
56매의 덱[편집]
56매의 트럼프의 카드:
{{Cards|kn}}
또는{{Cards|n}}
= (표준의 56매의 트럼프의 나이트){{Cards|1}}
= (표준의 56매의 트럼프){{Cards|11}}
= (표준적이지 않은 56매의 트럼프)
조커[편집]
{{Cards|Jkr}}
=
「r」로 붉은 조커, 「b」로 검은 조커:
매개변수 「rank_name
」및「suit_name
」으로 지정하는 것도 가능(자세한 것은 후술의 「어려운 사용법」을 참조):
?[편집]
불명의 랭크를 지정하기 위한 심볼:
커스터마이즈 된 카드[편집]
「카드」로 어떤 문자열이라도 지정하는 것이 가능하다. 예: {{Cards|Cd}}
= , {{Cards|Vs}}
= , {{Cards|€h}}
= , {{Cards|구c}}
=
「s·h·d·c·r·b」(대소 문자는 구별하지 않는다)의 하나, 또는 「♠·♥·♦·♣」의 하나로 끝나 있는 경우, 그 문자는 슈트를 나타내는 것으로 간주해진다. 「&」을 이스케이프 문자로서 사용하는 것도 가능하다. 예:
{{Cards|R&}}
= , {{Cards|Joker&}}
= , {{Cards|♥♥&}}
=
문자열이 「a·k·q·kn·j·jkr·x」의 하나로 시작되어 있는 경우, 최초의 문자는 대문자화 된다. 대문자화를 막으려면, <span></span>
로 묶는다:{{Cards|<span>k</span>s}}
=
슈트[편집]
{{Cards|s}}
또는{{Cards|♠}}
={{Cards|h}}
또는{{Cards|♥}}
={{Cards|d}}
또는{{Cards|♦}}
={{Cards|c}}
또는{{Cards|♣}}
={{Cards|r}}
={{Cards|b}}
=
복합[편집]
{{Cards|Ac|Kd|Ts|2h}}
또는{{Cards|A♣|K♦|10♠|2♥}}
=- 랭크만 있고 슈트가 없다:
{{Cards|A|K|T|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 = --> }}
|
|
|
|
어느 매개변수든 필수는 아니다.
separator
: 카드와 카드를 분리하는 문자열. 기본은 줄 바꿈 없는 공백 ( )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
: 스페이스에 이어 슈트의 풀네임을 표시한다: " ", " ", " ", " ", " ", " ". 슈트의 풀네임을 사용했을 경우, 랭크도 풀네임으로 하고, 사이를 반점이나 스페이스(줄 바꿈 없는 공백「 」을 사용할 필요가 있다)로 단락짓는 것이 보통이겠지만, 그렇게 하려면 이하와 같이 쓴다:{{Cards|Ac|Kd|10s|2h|separator=, |rank_name=full|suit_name=full}}
= , , ,letter
: 슈트명을 알파벳 1문자로 기록한다: " ", " ", " ", " ", " ", " "- 그 이외(빈 매개변수 또는 매개변수를 지정하지 않는 경우를 포함한다):기본, 보통 슈트명: " ", " ", " ", " ", " ", " "
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}}
=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}}
는 를 생성해, 그 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">♣</span>
</span> <!-- 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">♥</span>
</span>
<span style="color:red;" class="playingcards diamonds">
<span class="cardranks">Kn</span><span class="cardsuits">♦</span>
</span>
<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>
<span style="" class="playingcards">
<span class="cardranks">J</span>
</span>
<span style="color:black;" class="playingcards spades">
<span class="cardsuits">♠</span>
</span>
</b>
트럼프용의 틀은 표준적인 슈트 색에 맞추어 자동적으로 적·흑의 색을 칠한다. 그 이외의 색을 사용하고 싶은 경우에는, 이하의 CSS를 유저 스타일 시트에 추가하는 것.
/* Standard four-color deck */
.diamonds { color: blue !important }
.clubs { color: green !important }
개발자용 링크[편집]
이 틀은 구조가 복잡하고, 많은 기능을 포함하고 있습니다. 틀의 구조를 충분히 이해하기 전까지는 이 틀을 바꾸지 마시고, 편집 후 문제가 생기면 바로 되돌리기 해 주세요. 틀의 시험은 /시험장에서 해볼 수 있습니다. |