diff options
author | Tor Andersson <tor@ccxvii.net> | 2021-07-29 19:24:40 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-02-18 12:12:42 +0100 |
commit | 51195501a6c6711fcc37892ef78ee65edc5b2112 (patch) | |
tree | 9b829c5ed14ff55d780605d5048a529ddd519bb4 | |
parent | 29da4570f69c136cac8ad610566b9456e2cd3972 (diff) | |
download | shores-of-tripoli-51195501a6c6711fcc37892ef78ee65edc5b2112.tar.gz |
tripoli: Fix active player during simultaneous discards.
-rw-r--r-- | rules.js | 20 |
1 files changed, 12 insertions, 8 deletions
@@ -615,16 +615,20 @@ function start_of_year() { } function goto_hand_size() { - if (game.us.hand.length > 8 || game.tr.hand.length > 8) { + game.state = 'hand_size'; + if (game.tr.hand.length > 8) + game.tr.queue = []; + if (game.us.hand.length > 8) + game.us.queue = []; + + if (game.tr.queue && game.us.queue) game.active = "Both"; - game.state = 'hand_size'; - if (game.tr.hand.length > 8) - game.tr.queue = []; - if (game.us.hand.length > 8) - game.us.queue = []; - } else { + else if (game.tr.queue) + game.active = TR; + else if (game.us.queue) + game.active = US; + else goto_american_play(); - } } function format_discard(n) { |