jcbantuelle/dominion-meteor

View on GitHub
app/cards/empires/kings_castle.js

Summary

Maintainability
A
1 hr
Test Coverage
KingsCastle = class KingsCastle extends Castles {

  coin_cost() {
    return 10
  }

  victory_points(player_cards) {
    return this.point_variable(player_cards) * 2
  }

  point_variable(player_cards) {
    return _.size(_.filter(player_cards, function(card) {
      return _.includes(_.words(card.types), 'castle')
    }))
  }

}