diff options
-rw-r--r-- | rules.js | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -3986,13 +3986,15 @@ function draw_cards(deck, democrat_hand, communist_hand, dem_hand_limit, com_han } else if (turn === "communist" && communist_hand.length < com_hand_limit) { communist_hand.push(draw_card(deck)) turn = "democrat" - } else if (turn === "communist" && communist_hand.length === com_hand_limit) { + } else if (turn === "communist" && communist_hand.length >= com_hand_limit) { turn = "democrat" } else if (turn === "democrat" && democrat_hand.length < dem_hand_limit) { democrat_hand.push(draw_card(deck)) turn = "communist" - } else if (turn === "democrat" && democrat_hand.length === dem_hand_limit) { + } else if (turn === "democrat" && democrat_hand.length >= dem_hand_limit) { turn = "communist" + } else { + throw new Error("Impossible state when drawing cards.") } } clear_undo() |