diff options
author | Tor Andersson <tor@ccxvii.net> | 2023-05-02 23:31:18 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-05-03 18:48:16 +0200 |
commit | 78d09bf906cbf76affb0490b89f12e404ac934a7 (patch) | |
tree | 1d991fb5768d81af6d4c5ecbcf8e242ae282000b /rules.js | |
parent | 17d599beb94ec286cab5c994f639a557f2cce4bb (diff) | |
download | andean-abyss-78d09bf906cbf76affb0490b89f12e404ac934a7.tar.gz |
Beta release.
Diffstat (limited to 'rules.js')
-rw-r--r-- | rules.js | 13 |
1 files changed, 6 insertions, 7 deletions
@@ -6,7 +6,7 @@ const AUTOMATIC = true -const PATROL_UNDO = true +const PATROL_RESET = false // reset Patrol per-cube undo states after hitting "Next" let states = {} let game = null @@ -3022,7 +3022,8 @@ function goto_patrol2() { else game.state = "patrol" game.op.who = -1 - game.op.undo = game.undo.length + if (PATROL_RESET) + game.op.undo = game.undo.length } function can_patrol() { @@ -3165,13 +3166,11 @@ states.patrol = { }, piece(p) { if (game.op.who < 0) { - if (PATROL_UNDO) - push_undo() + push_undo() game.op.who = p set_add(game.op.pieces, p) } else { - if (PATROL_UNDO) - pop_undo() + pop_undo() game.op.who = -1 } }, @@ -3188,7 +3187,7 @@ states.patrol = { }, next() { // Reset undo stack to beginning of Operation. - if (PATROL_UNDO) + if (PATROL_RESET) game.undo.length = game.op.undo end_patrol_move() }, |