From 16b59192ec267f24338078d4fd40b63743e21c4c Mon Sep 17 00:00:00 2001 From: Joël Simoneau Date: Fri, 25 Apr 2025 21:05:32 -0400 Subject: Patch for missing discard --- rules.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rules.js b/rules.js index e8cae32..a59433d 100644 --- a/rules.js +++ b/rules.js @@ -114,7 +114,6 @@ exports.view = function (state, role) { let this_card = game.deck[0] | 0 let deck_size = Math.max(0, game.deck.length - 1) let card_back = next_card_back() - view = { state: game.state, prompt: null, @@ -408,6 +407,9 @@ function end_card() { } function update_discard() { + if ("discard" in game === false) { + game.discard = [] + } if (this_card() === 45) game.discard = [45] else if (this_card() === 46) -- cgit v1.2.3