summaryrefslogtreecommitdiff
path: root/rules.js
diff options
context:
space:
mode:
Diffstat (limited to 'rules.js')
-rw-r--r--rules.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/rules.js b/rules.js
index e068bbf..9e8cd52 100644
--- a/rules.js
+++ b/rules.js
@@ -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);