diff options
author | Tor Andersson <tor@ccxvii.net> | 2024-11-24 12:54:52 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2024-11-24 12:54:52 +0100 |
commit | d1b2688513bf616dbbf98924a10fb0c08913ea14 (patch) | |
tree | e9df163342782c94f81a3c4d0ed07c10f710ef6f /rules.js | |
parent | c8a4d0daa43e26b492b3d1e1bae47da1bf6655b4 (diff) | |
download | julius-caesar-d1b2688513bf616dbbf98924a10fb0c08913ea14.tar.gz |
Add dont_snap callback to prevent extra snapshots during card selection.
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -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 |