From 730adc321bbc4606d11773ede379df169fb5bbfc Mon Sep 17 00:00:00 2001 From: iainp5 Date: Sat, 9 Nov 2024 09:03:47 +0000 Subject: Setup view_opp_power_hamd --- rules.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/rules.js b/rules.js index e6d59f9..2d54167 100644 --- a/rules.js +++ b/rules.js @@ -359,7 +359,7 @@ exports.view = function(state, player) { strategy_deck: game.strategy_deck.length, strategy_removed: game.strategy_removed, discard: game.discard, - show_opp_hand: game.view_opp_hand, + show_opp_hand: game.view_opp_hand, /* Is this still needed?*/ democrat_hand: game.democrat_hand.length, communist_hand: game.communist_hand.length, @@ -405,6 +405,11 @@ exports.view = function(state, player) { view.opp_hand = [...game.dem_pwr_hand].sort((a, b) => a - b) view.power_hand = [...game.com_pwr_hand].sort((a, b) => a - b) } + if (game.view_opp_power_hand) { + if (player === COM) { + view.view_opp_power_hand = [...game.dem_pwr_hand].sort((a, b) => a - b) + } + } if (player === DEM) { view.samizdat = game.samizdat_card -- cgit v1.2.3