Difference between revisions of "Template:Game"

From comp.tf
Jump to navigation Jump to search
 
(12 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
<includeonly><div class="match-row">
 
<includeonly><div class="match-row">
<div class="left">
+
<div class="left">
  <div class="check">{{#ifeq:{{{win|}}}|1|[[Image:GreenCheck.png|link=]]|[[Image:NoCheck.png|link=]]}}</div>
+
<div class="check">{{#ifeq:{{{win|}}}|draw|<abbr title="Draw">D</abbr>|{{#ifeq:{{{win|}}}|1|[[File:GreenCheck.png|link=]]|[[File:NoCheck.png|link=]]}}}}</div>
  <div class="score team1">{{{t1score|}}}</div>
+
<div class="score team1">
</div>
+
{{#if:{{{t1score|}}}|{{{t1score}}}|}}
<div class="map"><b>[[{{{map|}}}]]</b></div>
+
</div>
<div class="right">
+
</div>
  <div class="score team2">{{{t2score|}}}</div>
+
<div class="right">
  <div class="check">{{#ifeq:{{{win|}}}|2|[[Image:GreenCheck.png|link=]]|[[Image:NoCheck.png|link=]]}}</div>
+
<div class="check">{{#ifeq:{{{win|}}}|draw|<abbr title="Draw">D</abbr>|{{#ifeq:{{{win|}}}|2|[[File:GreenCheck.png|link=]]|[[File:NoCheck.png|link=]]}}}}</div>
</div>
+
<div class="score team2">
<div style="clear:both"></div>
+
{{#if:{{{t2score|}}}|{{{t2score}}}|}}
</div></includeonly>
+
</div>
 +
</div>
 +
<div class="map">
 +
{{#ifeq:{{{unplayed|}}}|1|<del>|}}
 +
<strong>{{#if:{{{map|}}}|[[{{{map}}}]]|TBD}}</strong>
 +
{{#ifeq:{{{unplayed|}}}|1|</del>|}}
 +
</div>
 +
<div style="clear:both"></div>
 +
</div><!--
 +
 
 +
Storage of score in variables (later in SMW)
 +
-->{{#switch:{{{win|}}}
 +
|1={{#vardefine:team1wins|{{#expr:{{#var:team1wins|0}} + 1}} }}
 +
|2={{#vardefine:team2wins|{{#expr:{{#var:team2wins|0}} + 1}} }}
 +
| }}</includeonly>
 +
<noinclude>
 +
<div class="bracket-game-details" style="margin-left: 0px; margin-top: -30px; display: block;"><div class="matches" style="padding:2px 1px">{{Game |t1score=4 |t2score=1 |win=1 |map=cp_gullywash_final1 }}</div></div>
 +
</noinclude>

Latest revision as of 23:02, 26 August 2017