diff options
author | Tor Andersson <tor@ccxvii.net> | 2023-06-05 23:08:23 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-06-05 23:08:23 +0200 |
commit | dce4ca258b4b63dc520b2a7ce3497c00f8716142 (patch) | |
tree | 38d48a1c9839a1c166fea22d6e77630601e500e2 /rules.js | |
parent | 06b13fbc1a642125fbae14bafba36685ac0d1544 (diff) | |
download | andean-abyss-dce4ca258b4b63dc520b2a7ce3497c00f8716142.tar.gz |
Show propaganda cards left in deck.
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -8106,6 +8106,14 @@ function is_current_role(role) { return false } +function count_propaganda_left() { + let n = 0 + for (let i = 2; i < game.deck.length; ++i) + if (game.deck[i] === PROPAGANDA) + ++n + return n +} + exports.view = function (state, role) { load_game(state) @@ -8120,7 +8128,7 @@ exports.view = function (state, role) { scenario: game.scenario, current: game.current, - deck: [ this_card, next_card, deck_size ], + deck: [ this_card, next_card, deck_size, count_propaganda_left() ], capabilities: game.capabilities, momentum: game.momentum, president: game.president, |