diff options
-rw-r--r-- | rules.js | 6 | ||||
-rw-r--r-- | rules.ts | 6 |
2 files changed, 10 insertions, 2 deletions
@@ -163,7 +163,11 @@ function setup_player_turn(faction_id) { next(); } else { - setup_player_turn(get_next_faction_in_player_order(next_faction)); + const next_next_faction = get_next_faction_in_player_order(next_faction); + if (game.selected_cards[next_next_faction].length > 0) + setup_player_turn(get_next_faction_in_player_order(next_next_faction)); + else + throw new Error("impossible situation"); } } function check_end_of_year_discard() { @@ -288,7 +288,11 @@ function setup_player_turn(faction_id: FactionId) { * having played Momentum medallion in a previous turn. * This will skip their turn */ - setup_player_turn(get_next_faction_in_player_order(next_faction)) + const next_next_faction = get_next_faction_in_player_order(next_faction); + if (game.selected_cards[next_next_faction].length > 0) + setup_player_turn(get_next_faction_in_player_order(next_next_faction)); + else + throw new Error("impossible situation"); } } |