diff options
-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 |