summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rules.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/rules.js b/rules.js
index 601b431..42aed83 100644
--- a/rules.js
+++ b/rules.js
@@ -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,
};