From d1b2688513bf616dbbf98924a10fb0c08913ea14 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Sun, 24 Nov 2024 12:54:52 +0100 Subject: Add dont_snap callback to prevent extra snapshots during card selection. --- rules.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/rules.js b/rules.js index 8eebf44..2dee9bc 100644 --- a/rules.js +++ b/rules.js @@ -2802,6 +2802,14 @@ function observer_hand() { return hand } +exports.dont_snap = function(state) { + if (state.state === "play_card" && state.active !== BOTH) + return true + if (state.state === "discard_and_play_card" && state.active !== BOTH) + return true + return false +} + exports.view = function(state, current) { game = state -- cgit v1.2.3