jcbantuelle/dominion-meteor

View on GitHub
app/game/client/templates/turn_status.html

Summary

Maintainability
Test Coverage
<template name="turn_status">
  {{#if my_turn}}
    Actions: <strong>{{actions}}</strong>
    <br />
    Buys: <strong>{{buys}}</strong>
    <br />
    {{#if ../player_cards.coffers}}
      Coffers: <strong>{{../player_cards.coffers}}</strong> {{#if allow_treasures}}<button id="play-coffer" class="btn btn-xs btn-warning">+</button>{{/if}}
      <br />
    {{/if}}
    {{#if ../player_cards.villagers}}
      Villagers: <strong>{{../player_cards.villagers}}</strong> {{#if allow_villagers}} <button id="play-villager" class="btn btn-xs btn-success">+</button>{{/if}}
      <br />
    {{/if}}
    {{#if ../player_cards.debt_tokens}}
      Debt Tokens: <strong>{{../player_cards.debt_tokens}}</strong> {{#if allow_debt}}<button id="play-debt-token" class="btn btn-xs btn-warning btn-debt">+</button>{{/if}}
      <br />
    {{/if}}
    To Spend: <strong>${{coins}}</strong>
    {{#each times potions}}
      &oplus;
    {{/each}}
  {{/if}}
</template>