diff options
author | Tor Andersson <tor@ccxvii.net> | 2024-06-05 23:12:32 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2024-06-05 23:12:54 +0200 |
commit | bf604c0ad20aa4e158e744a15a321efe7cc78552 (patch) | |
tree | a782c30d7af7d079d6416dd29dec7ec0b9b16118 | |
parent | eddf155524f44b5437a7028cbf33695a0d449f2c (diff) | |
download | friedrich-bf604c0ad20aa4e158e744a15a321efe7cc78552.tar.gz |
prepare obfuscating cards
-rw-r--r-- | rules.js | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -4450,10 +4450,14 @@ function mask_troops(player) { function mask_hand(player) { let view_hand = [] for (let pow of all_powers) { - if (player_from_power(pow) === player) + if (player_from_power(pow) === player) { view_hand[pow] = game.hand[pow] - else + } else { view_hand[pow] = game.hand[pow].map(c => c & ~127) + // TODO: obfuscate number of cards in hand + // view_hand[pow] = Math.ceil(game.hand[pow].length / 3) * 3 + // view_hand[pow] = Math.ceil(game.hand[pow].length / 5) + } } return view_hand } |