summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2021-07-29 19:24:40 +0200
committerTor Andersson <tor@ccxvii.net>2023-02-18 12:12:42 +0100
commit51195501a6c6711fcc37892ef78ee65edc5b2112 (patch)
tree9b829c5ed14ff55d780605d5048a529ddd519bb4
parent29da4570f69c136cac8ad610566b9456e2cd3972 (diff)
downloadshores-of-tripoli-51195501a6c6711fcc37892ef78ee65edc5b2112.tar.gz
tripoli: Fix active player during simultaneous discards.
-rw-r--r--rules.js20
1 files changed, 12 insertions, 8 deletions
diff --git a/rules.js b/rules.js
index 5d63092..e6dd4e8 100644
--- a/rules.js
+++ b/rules.js
@@ -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) {