diff options
author | Tor Andersson <tor@ccxvii.net> | 2024-05-25 19:32:33 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2024-05-30 21:59:25 +0200 |
commit | 2d03154db7fa2e25b7188c0599d1807ae345cd2e (patch) | |
tree | 295496184353d76445a1e2cd15ab61a6fa841ab4 | |
parent | fd3f5c5ae56793b7a9ded795720864e2ecbbba9b (diff) | |
download | friedrich-2d03154db7fa2e25b7188c0599d1807ae345cd2e.tar.gz |
confirm ending movement with unmoved pieces
-rw-r--r-- | play.js | 3 | ||||
-rw-r--r-- | rules.js | 8 |
2 files changed, 10 insertions, 1 deletions
@@ -902,6 +902,9 @@ function on_update() { action_button("end_supply", "End supply") action_button("end_turn", "End turn") + confirm_action_button("confirm_end_movement", "End movement", + "You still have UNMOVED pieces.?") + action_button("undo", "Undo") process_actions() @@ -1347,7 +1347,10 @@ states.movement = { else prompt("Move your generals and supply trains.") - view.actions.end_movement = 1 + if (done_trains && done_generals) + view.actions.end_movement = 1 + else + view.actions.confirm_end_movement = 1 }, piece(p) { push_undo() @@ -1375,6 +1378,9 @@ states.movement = { else resume_move_general() }, + confirm_end_movement() { + this.end_movement() + }, end_movement() { push_undo() goto_recruit() |