summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoël Simoneau <simoneaujoel@gmail.com>2025-04-25 21:05:32 -0400
committerJoël Simoneau <simoneaujoel@gmail.com>2025-04-25 21:05:32 -0400
commit16b59192ec267f24338078d4fd40b63743e21c4c (patch)
treed6b64fc534d66a4e1126eddba07149beb3e502ff
parentb94414d6a241bac4be4e5f4e105be1e9b74125d1 (diff)
downloadvijayanagara-master.tar.gz
Patch for missing discardHEADmaster
-rw-r--r--rules.js4
1 files changed, 3 insertions, 1 deletions
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)