diff options
author | iainp5 <iain.pearce.ip@gmail.com> | 2024-11-09 09:03:47 +0000 |
---|---|---|
committer | iainp5 <iain.pearce.ip@gmail.com> | 2024-11-09 09:03:47 +0000 |
commit | 730adc321bbc4606d11773ede379df169fb5bbfc (patch) | |
tree | a4fadd89a68354bcb38788a64fa4c4cede7368c4 | |
parent | caa9af38b1312e7574ae2f528b08dbc6a32ffa71 (diff) | |
download | 1989-dawn-of-freedom-730adc321bbc4606d11773ede379df169fb5bbfc.tar.gz |
Setup view_opp_power_hamd
-rw-r--r-- | rules.js | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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 |