diff options
author | Mischa Untaga <99098079+MischaU8@users.noreply.github.com> | 2023-11-28 12:03:23 +0100 |
---|---|---|
committer | Mischa Untaga <99098079+MischaU8@users.noreply.github.com> | 2023-11-28 12:03:23 +0100 |
commit | b554103c3218de56734f0cd179b124f6b12c0248 (patch) | |
tree | 3f86263379a32a0d3ae34612a3adae9b33368c72 | |
parent | f0a688a54b64f3632b07530b5b16c296d8933789 (diff) | |
download | votes-for-women-b554103c3218de56734f0cd179b124f6b12c0248.tar.gz |
show current voting score
-rw-r--r-- | play.js | 7 | ||||
-rw-r--r-- | rules.js | 7 |
2 files changed, 12 insertions, 2 deletions
@@ -576,12 +576,15 @@ function on_log(text) { // eslint-disable-line no-unused-vars return p } + function support_info() { - return `${view.support_buttons}\u{2b50} ${view.support_hand}\u{1f3b4}` + // TODO show the # of green_checks and red_xs instead of the congress circles when the 19th has passed instead + return `${view.support_buttons}\u{2b50} ${view.support_hand}\u{1f3b4} ${view.green_checks} \u{2713}` } function opposition_info() { - return `${view.opposition_buttons}\u{2b50} ${view.opposition_hand}\u{1f3b4}` + // TODO show the # of green_checks and red_xs instead of the congress circles when the 19th has passed instead + return `${view.opposition_buttons}\u{2b50} ${view.opposition_hand}\u{1f3b4} ${view.red_xs} \u{2717}` } function layout_cubes(list, xorig, yorig) { @@ -691,6 +691,8 @@ exports.view = function(state, player) { us_states: game.us_states, nineteenth_amendment: game.nineteenth_amendment, campaigners: game.campaigners, + green_checks: 0, + red_xs: 0, strategy_deck: game.strategy_deck.length, strategy_draw: game.strategy_draw, @@ -715,6 +717,11 @@ exports.view = function(state, player) { selected_cards: [], } + if (game.nineteenth_amendment) { + view.green_checks = count_green_checks() + view.red_xs = count_red_xs() + } + if (player === SUF) { view.hand = game.support_hand view.set_aside = game.support_set_aside |