diff options
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -2777,6 +2777,18 @@ function assign_vp(points, score, sorted) { } } +function count_dominance_cards() { + let n = 0; + for (let row = 0; row < 2; ++row) + for (let col = 0; col < 6; ++col) + if (is_dominance_check(game.market_cards[row][col])) + ++n; + for (let i = 0; i < game.deck.length; ++i) + if (is_dominance_check(game.deck[i])) + ++n; + return n; +} + function is_final_dominance_check() { for (let row = 0; row < 2; ++row) for (let col = 0; col < 6; ++col) @@ -3076,6 +3088,7 @@ exports.view = function(state, current) { market_coins: game.market_coins, players: game.players, selected: game.selected, + cards: [ game.deck.length, count_dominance_cards() ], open: game.open, }; |