This is a documentation for Board Game Arena: play board games online !

Template:Card: Difference between revisions

From Board Game Arena
Jump to navigation Jump to search
m (line-height:1.7rem)
(documentation moved from Template:Club, reduced width, added   default value)
Line 1: Line 1:
<span style="background:{{{background|#fafafa}}};box-shadow:0.05rem 0.05rem 0.1rem 0.1rem rgba(0,0,0,0.2),inset 0 0 0 0.1rem #fafafa;border-radius:0.2rem;padding:0.25rem;line-height:1.7rem;color:{{{colour|#000}}};">{{{|}}}</span><noinclude>
<span style="background:{{{background|#fafafa}}};box-shadow:0.05rem 0.05rem 0.1rem 0.1rem rgba(0,0,0,0.2),inset 0 0 0 0.1rem #fafafa;border-radius:0.2rem;padding-top:0.25rem;padding-bottom:0.25rem;padding-left:0.15rem;padding-right:0.15rem;line-height:1.7rem;color:{{{colour|#000}}};">{{{|&nbsp;&nbsp;&nbsp;}}}</span><noinclude>


For documentation on using playing card templates on BGA wiki pages, see [[Template:Club]]
{|class="wikitable" style="text-align:center;"
|+Playing card template examples for a BGA wiki page
!Type
|<code><nowiki>{{club}}</nowiki></code>
|<code><nowiki>{{spade}}</nowiki></code>
|<code><nowiki>{{heart}}</nowiki></code>
|<code><nowiki>{{diamond}}</nowiki></code>
|<code><nowiki>{{cardBack}}</nowiki></code>
|<code><nowiki>{{card|=A}}</nowiki></code>
|<code><nowiki>{{club|=A}}</nowiki></code>
|<code><nowiki>{{club|=A|colour=green}}</nowiki></code>
|-
!Result
|{{club}}
|{{spade}}
|{{heart}}
|{{diamond}}
|{{cardBack}}
|{{card|=A}}
|{{club|=A}}
|{{club|=A|colour=green}}
|}


{{card|background=red|=X}}{{card|=X}}
'''Note:''' Game Help pages (e.g. '[[Gamehelpmachiavelli|GameHelpMachiavelli]]') display on Rules Summary pages
e.g. https://boardgamearena.com/gamepanel?game=machiavelli under HOW TO PLAY? > See More > RULES SUMMARY
 
{|class="wikitable" style="text-align:left;"
|+Available parameters
!Parameter
!Default value
!Example
!Result
!Description
|-
|<code style="color:#b00;">null</code>
|<code><nowiki>&amp;nbsp;&amp;nbsp;&amp;nbsp;</nowiki></code>
|<code><nowiki>{{card|=A}}</nowiki></code>
|{{card|=A}}
|<b><i>Optional:</i></b> specify a card value such as <code>K</code> for King.
|-
|<code>colour</code>
|<code>#000</code> (black)
|<code><nowiki>{{club|colour=green}}</nowiki></code>
|{{club|colour=green}}
|<b><i>Optional:</i></b> specify the text colour as a [https://developer.mozilla.org/en-US/docs/Web/CSS/color CSS colour].
|-
|<code>background</code>
|<code>#fafafa</code> (almost white)
|<code><nowiki>{{diamond|colour=white|background=#c00}}</nowiki></code>
|{{diamond|colour=white|background=#c00}}
|<b><i>Optional:</i></b> specify the background colour as a [https://developer.mozilla.org/en-US/docs/Web/CSS/color CSS colour].
|}
 
== Examples ==
 
=== Machiavelli ===
 
* The table has the set {{spade|=5}}{{diamond|=5|colour=blue}}{{heart|=5}} .
* A player may play a combination, such as {{spade|=6}}{{diamond|=6|colour=blue}}{{heart|=6}} or {{spade|=6}}{{spade|=7}}{{spade|=8}}, or may extend the existing set by playing {{club|=5|colour=green}} .
<pre>
* The table has the set {{spade|=5}}{{diamond|=5|colour=blue}}{{heart|=5}} .
* A player may play a combination, such as {{spade|=6}}{{diamond|=6|colour=blue}}{{heart|=6}} or {{spade|=6}}{{spade|=7}}{{spade|=8}}, or may extend the existing set by playing {{club|=5|colour=green}} .
</pre>
----
{|class="wikitable" style="width:auto; text-align:center;"
!style="width:8rem;"|Table
!style="width:4rem;"|In hand
!style="width:8rem;"|Rearrange
!style="width:8rem;"|Add card
|-
|{{club|=5|colour=green}}{{diamond|=5|colour=blue}}{{heart|=5}}{{spade|=5}}
{{club|=6|colour=green}}{{club|=7|colour=green}}{{club|=8|colour=green}}
|{{club|=4|colour=green}}
|{{diamond|=5|colour=blue}}{{heart|=5}}{{spade|=5}}
{{club|=5|colour=green}}{{club|=6|colour=green}}{{club|=7|colour=green}}{{club|=8|colour=green}}
|{{diamond|=5|colour=blue}}{{heart|=5}}{{spade|=5}}
{{club|=4|colour=green}}{{club|=5|colour=green}}{{club|=6|colour=green}}{{club|=7|colour=green}}{{club|=8|colour=green}}
|-
|{{club|=5|colour=green}}{{diamond|=5|colour=blue}}{{heart|=5}}
{{club|=6|colour=green}}{{diamond|=6|colour=blue}}{{heart|=6}}
 
{{club|=7|colour=green}}{{diamond|=7|colour=blue}}{{heart|=7}}
|{{club|=8|colour=green}}
|{{club|=5|colour=green}}{{club|=6|colour=green}}{{club|=7|colour=green}}
{{diamond|=5|colour=blue}}{{diamond|=6|colour=blue}}{{diamond|=7|colour=blue}}
 
{{heart|=5}}{{heart|=6}}{{heart|=7}}
|{{club|=5|colour=green}}{{club|=6|colour=green}}{{club|=7|colour=green}}{{club|=8|colour=green}}
{{diamond|=5|colour=blue}}{{diamond|=6|colour=blue}}{{diamond|=7|colour=blue}}
 
{{heart|=5}}{{heart|=6}}{{heart|=7}}
|}
<pre>
{|class="wikitable" style="width:auto; text-align:center;"
!style="width:8rem;"|Table
!style="width:4rem;"|In hand
!style="width:8rem;"|Rearrange
!style="width:8rem;"|Add card
|-
|{{club|=5|colour=green}}{{diamond|=5|colour=blue}}{{heart|=5}}{{spade|=5}}
{{club|=6|colour=green}}{{club|=7|colour=green}}{{club|=8|colour=green}}
|{{club|=4|colour=green}}
|{{diamond|=5|colour=blue}}{{heart|=5}}{{spade|=5}}
{{club|=5|colour=green}}{{club|=6|colour=green}}{{club|=7|colour=green}}{{club|=8|colour=green}}
|{{diamond|=5|colour=blue}}{{heart|=5}}{{spade|=5}}
{{club|=4|colour=green}}{{club|=5|colour=green}}{{club|=6|colour=green}}{{club|=7|colour=green}}{{club|=8|colour=green}}
|-
|{{club|=5}}{{diamond|=5|colour=blue}}{{heart|=5}}
{{club|=6}}{{diamond|=6|colour=blue}}{{heart|=6}}
 
{{club|=7|colour=green}}{{diamond|=7|colour=blue}}{{heart|=7}}
|{{club|=8|colour=green}}
|{{club|=5|colour=green}}{{club|=6|colour=green}}{{club|=7|colour=green}}
{{diamond|=5|colour=blue}}{{diamond|=6|colour=blue}}{{diamond|=7|colour=blue}}
 
{{heart|=5}}{{heart|=6}}{{heart|=7}}
|{{club|=5|colour=green}}{{club|=6|colour=green}}{{club|=7|colour=green}}{{club|=8|colour=green}}
{{diamond|=5|colour=blue}}{{diamond|=6|colour=blue}}{{diamond|=7|colour=blue}}
 
{{heart|=5}}{{heart|=6}}{{heart|=7}}
|}
</pre>
 
=== Palace ===
 
{|class="wikitable" style="width:auto; text-align:center;"
|+style="text-align:left;"|''The deck is already empty''
!Player
!In hand
!On table
!Stack top card
!style="text-align:left;"|Action
|-
|'''A'''
|{{heart|=3}}{{club|=3}}
{{spade|=4}}{{club|=4}}
|{{club|=7}}{{Diamond|=7}}{{spade|=7}}
{{cardBack}}{{cardBack}}{{cardBack}}
|{{diamond|=2}}
|style="text-align:left;"|Plays {{heart|=3}}{{club|=3}} .
|-
|'''B'''
| -
|{{Diamond|=8}}{{club|=J}}{{Diamond|=Q}}
{{cardBack}}{{cardBack}}{{cardBack}}
|{{heart|=3}}
|style="text-align:left;"|Plays {{Diamond|=8}} from the table.
|-
|rowspan="4"|'''C'''
|{{spade|=8}}{{heart|=8}}{{club|=8}}
{{heart|=6}}{{club|=6}}{{Diamond|=6}}{{spade|=6}}
|{{club|=10}}{{Diamond|=10}}{{spade|=10}}
{{cardBack}}{{cardBack}}{{cardBack}}
|{{Diamond|=8}}
|style="text-align:left;"|Plays {{spade|=8}}{{heart|=8}}{{club|=8}} .
This '''[[#Special_action_cards_and_plays|burns]]''' all the cards in the stack and grants an additional turn.
|-
|{{heart|=6}}{{club|=6}}{{Diamond|=6}}{{spade|=6}}
|{{club|=10}}{{Diamond|=10}}{{spade|=10}}
{{cardBack}}{{cardBack}}{{cardBack}}
| -
|style="text-align:left;"|Plays {{heart|=6}}{{club|=6}}{{Diamond|=6}}{{spade|=6}} .
This '''[[#Special_action_cards_and_plays|burns]]''' all the cards in the stack and grants ''another'' additional turn.
|-
| -
|{{club|=10}}{{Diamond|=10}}{{spade|=10}}
{{cardBack}}{{cardBack}}{{cardBack}}
| -
|style="text-align:left;"|Plays {{club|=10}}{{Diamond|=10}}{{spade|=10}} .
This '''[[#Special_action_cards_and_plays|burns]]''' the stack and grants ''yet another'' additional turn.
|-
| -
| -
{{club|=Q}}{{cardBack}}{{cardBack}}
| -
|style="text-align:left;"|Plays a face-down card, {{club|=Q}} .
|-
|'''D'''
|{{club|=9}}{{heart|=10}}
|{{club|=K}}{{Diamond|=K}}{{spade|=K}}
{{cardBack}}{{cardBack}}{{cardBack}}
|{{club|=Q}}
|style="text-align:left;"|Cannot play and picks up the stack.
''Luckily it's just the'' {{club|=Q}} .
|}
 
<pre>
{|class="wikitable" style="width:auto; text-align:center;"
|+style="text-align:left;"|''The deck is already empty''
!Player
!In hand
!On table
!Stack top card
!style="text-align:left;"|Action
|-
|'''A'''
|{{heart|=3}}{{club|=3}}
{{spade|=4}}{{club|=4}}
|{{club|=7}}{{Diamond|=7}}{{spade|=7}}
{{cardBack}}{{cardBack}}{{cardBack}}
|{{diamond|=2}}
|style="text-align:left;"|Plays {{heart|=3}}{{club|=3}} .
|-
|'''B'''
| -
|{{Diamond|=8}}{{club|=J}}{{Diamond|=Q}}
{{cardBack}}{{cardBack}}{{cardBack}}
|{{heart|=3}}
|style="text-align:left;"|Plays {{Diamond|=8}} from the table.
|-
|rowspan="4"|'''C'''
|{{spade|=8}}{{heart|=8}}{{club|=8}}
{{heart|=6}}{{club|=6}}{{Diamond|=6}}{{spade|=6}}
|{{club|=10}}{{Diamond|=10}}{{spade|=10}}
{{cardBack}}{{cardBack}}{{cardBack}}
|{{Diamond|=8}}
|style="text-align:left;"|Plays {{spade|=8}}{{heart|=8}}{{club|=8}} .
This '''[[#Special_action_cards_and_plays|burns]]''' all the cards in the stack and grants an additional turn.
|-
|{{heart|=6}}{{club|=6}}{{Diamond|=6}}{{spade|=6}}
|{{club|=10}}{{Diamond|=10}}{{spade|=10}}
{{cardBack}}{{cardBack}}{{cardBack}}
| -
|style="text-align:left;"|Plays {{heart|=6}}{{club|=6}}{{Diamond|=6}}{{spade|=6}} .
This '''[[#Special_action_cards_and_plays|burns]]''' all the cards in the stack and grants ''another'' additional turn.
|-
| -
|{{club|=10}}{{Diamond|=10}}{{spade|=10}}
{{cardBack}}{{cardBack}}{{cardBack}}
| -
|style="text-align:left;"|Plays {{club|=10}}{{Diamond|=10}}{{spade|=10}} .
This '''[[#Special_action_cards_and_plays|burns]]''' the stack and grants ''yet another'' additional turn.
|-
| -
| -
{{club|=Q}}{{cardBack}}{{cardBack}}
| -
|style="text-align:left;"|Plays a face-down card, {{club|=Q}} .
|-
|'''D'''
|{{club|=9}}{{heart|=10}}
|{{club|=K}}{{Diamond|=K}}{{spade|=K}}
{{cardBack}}{{cardBack}}{{cardBack}}
|{{club|=Q}}
|style="text-align:left;"|Cannot play and picks up the stack.
''Luckily it's just the'' {{club|=Q}} .
|}
</pre>


[[Category:Card templates]]
[[Category:Card templates]]
</noinclude>
</noinclude>

Revision as of 18:57, 9 January 2022

   

Playing card template examples for a BGA wiki page
Type {{club}} {{spade}} {{heart}} {{diamond}} {{cardBack}} {{card|=A}} {{club|=A}} {{club|=A|colour=green}}
Result                     A        

Note: Game Help pages (e.g. 'GameHelpMachiavelli') display on Rules Summary pages e.g. https://boardgamearena.com/gamepanel?game=machiavelli under HOW TO PLAY? > See More > RULES SUMMARY

Available parameters
Parameter Default value Example Result Description
null &nbsp;&nbsp;&nbsp; {{card|=A}} A Optional: specify a card value such as K for King.
colour #000 (black) {{club|colour=green}}     Optional: specify the text colour as a CSS colour.
background #fafafa (almost white) {{diamond|colour=white|background=#c00}}     Optional: specify the background colour as a CSS colour.

Examples

Machiavelli

  • The table has the set           .
  • A player may play a combination, such as           or          , or may extend the existing set by playing     .
* The table has the set {{spade|=5}}{{diamond|=5|colour=blue}}{{heart|=5}} .
* A player may play a combination, such as {{spade|=6}}{{diamond|=6|colour=blue}}{{heart|=6}} or {{spade|=6}}{{spade|=7}}{{spade|=8}}, or may extend the existing set by playing {{club|=5|colour=green}} .

Table In hand Rearrange Add card
            

         

             

            

         

               

         

         

         

             

         

         

            

         

         

{|class="wikitable" style="width:auto; text-align:center;"
!style="width:8rem;"|Table
!style="width:4rem;"|In hand
!style="width:8rem;"|Rearrange
!style="width:8rem;"|Add card
|-
|{{club|=5|colour=green}}{{diamond|=5|colour=blue}}{{heart|=5}}{{spade|=5}} 
{{club|=6|colour=green}}{{club|=7|colour=green}}{{club|=8|colour=green}}
|{{club|=4|colour=green}}
|{{diamond|=5|colour=blue}}{{heart|=5}}{{spade|=5}} 
{{club|=5|colour=green}}{{club|=6|colour=green}}{{club|=7|colour=green}}{{club|=8|colour=green}}
|{{diamond|=5|colour=blue}}{{heart|=5}}{{spade|=5}} 
{{club|=4|colour=green}}{{club|=5|colour=green}}{{club|=6|colour=green}}{{club|=7|colour=green}}{{club|=8|colour=green}}
|-
|{{club|=5}}{{diamond|=5|colour=blue}}{{heart|=5}}
{{club|=6}}{{diamond|=6|colour=blue}}{{heart|=6}}

{{club|=7|colour=green}}{{diamond|=7|colour=blue}}{{heart|=7}}
|{{club|=8|colour=green}}
|{{club|=5|colour=green}}{{club|=6|colour=green}}{{club|=7|colour=green}}
{{diamond|=5|colour=blue}}{{diamond|=6|colour=blue}}{{diamond|=7|colour=blue}}

{{heart|=5}}{{heart|=6}}{{heart|=7}}
|{{club|=5|colour=green}}{{club|=6|colour=green}}{{club|=7|colour=green}}{{club|=8|colour=green}}
{{diamond|=5|colour=blue}}{{diamond|=6|colour=blue}}{{diamond|=7|colour=blue}}

{{heart|=5}}{{heart|=6}}{{heart|=7}}
|}

Palace

The deck is already empty
Player In hand On table Stack top card Action
A       

      

         

         

    Plays        .
B -          

         

    Plays     from the table.
C          

            

         

         

    Plays           .

This burns all the cards in the stack and grants an additional turn.

                      

         

- Plays              .

This burns all the cards in the stack and grants another additional turn.

-          

         

- Plays           .

This burns the stack and grants yet another additional turn.

- -

         

- Plays a face-down card,     .
D                 

         

    Cannot play and picks up the stack.

Luckily it's just the     .

{|class="wikitable" style="width:auto; text-align:center;"
|+style="text-align:left;"|''The deck is already empty''
!Player
!In hand
!On table
!Stack top card
!style="text-align:left;"|Action
|-
|'''A'''
|{{heart|=3}}{{club|=3}}
{{spade|=4}}{{club|=4}}
|{{club|=7}}{{Diamond|=7}}{{spade|=7}}
{{cardBack}}{{cardBack}}{{cardBack}}
|{{diamond|=2}}
|style="text-align:left;"|Plays {{heart|=3}}{{club|=3}} .
|-
|'''B'''
| -
|{{Diamond|=8}}{{club|=J}}{{Diamond|=Q}}
{{cardBack}}{{cardBack}}{{cardBack}}
|{{heart|=3}}
|style="text-align:left;"|Plays {{Diamond|=8}} from the table.
|-
|rowspan="4"|'''C'''
|{{spade|=8}}{{heart|=8}}{{club|=8}}
{{heart|=6}}{{club|=6}}{{Diamond|=6}}{{spade|=6}}
|{{club|=10}}{{Diamond|=10}}{{spade|=10}}
{{cardBack}}{{cardBack}}{{cardBack}}
|{{Diamond|=8}}
|style="text-align:left;"|Plays {{spade|=8}}{{heart|=8}}{{club|=8}} .
This '''[[#Special_action_cards_and_plays|burns]]''' all the cards in the stack and grants an additional turn.
|-
|{{heart|=6}}{{club|=6}}{{Diamond|=6}}{{spade|=6}}
|{{club|=10}}{{Diamond|=10}}{{spade|=10}}
{{cardBack}}{{cardBack}}{{cardBack}}
| -
|style="text-align:left;"|Plays {{heart|=6}}{{club|=6}}{{Diamond|=6}}{{spade|=6}} .
This '''[[#Special_action_cards_and_plays|burns]]''' all the cards in the stack and grants ''another'' additional turn.
|-
| -
|{{club|=10}}{{Diamond|=10}}{{spade|=10}}
{{cardBack}}{{cardBack}}{{cardBack}}
| -
|style="text-align:left;"|Plays {{club|=10}}{{Diamond|=10}}{{spade|=10}} .
This '''[[#Special_action_cards_and_plays|burns]]''' the stack and grants ''yet another'' additional turn.
|-
| -
| -
{{club|=Q}}{{cardBack}}{{cardBack}}
| -
|style="text-align:left;"|Plays a face-down card, {{club|=Q}} .
|-
|'''D'''
|{{club|=9}}{{heart|=10}}
|{{club|=K}}{{Diamond|=K}}{{spade|=K}}
{{cardBack}}{{cardBack}}{{cardBack}}
|{{club|=Q}}
|style="text-align:left;"|Cannot play and picks up the stack.
''Luckily it's just the'' {{club|=Q}} .
|}