diff options
author | Tor Andersson <tor@ccxvii.net> | 2025-03-01 19:27:37 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2025-03-01 19:28:10 +0100 |
commit | 8ea2481d40d05dbdb07a2b787d016d51f9b89959 (patch) | |
tree | 51242240a5707ebf82c4d647e4d14863d52556f5 /rules.js | |
parent | 99de6e4bca3ec62d717ae255cf303dace1cb70e0 (diff) | |
download | land-and-freedom-8ea2481d40d05dbdb07a2b787d016d51f9b89959.tar.gz |
Fix intermittent bug with undo.
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -79,10 +79,10 @@ function gen_spend_hero_points() { } } function action(state, player, action, arg) { - if (action !== 'undo' && state.state !== 'choose_card') { - state.undo = push_undo(); - } game = state; + if (action !== 'undo' && game.state !== 'choose_card') { + push_undo(); + } let S = states[game.state]; if (action in S) S[action](arg, player); |