summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2023-12-24 00:40:36 +0100
committerTor Andersson <tor@ccxvii.net>2023-12-24 00:40:36 +0100
commit165421013f25743df1b8ac52a8ca2c5c668fc870 (patch)
treed3653230bd3e90796498f695bb40159745a7f1ff
parentb284592398848d1b606eb56ef00577fdf8502070 (diff)
downloadrommel-in-the-desert-165421013f25743df1b8ac52a8ca2c5c668fc870.tar.gz
Automatic resign menu.
-rw-r--r--play.html2
-rw-r--r--rules.js13
2 files changed, 0 insertions, 15 deletions
diff --git a/play.html b/play.html
index f33daa9..1f0753f 100644
--- a/play.html
+++ b/play.html
@@ -23,8 +23,6 @@
<menu>
<li><a href="info/rules.html" target="_blank">Rules</a>
<li><a href="info/units.html" target="_blank">Units</a>
- <li class="resign separator">
- <li class="resign" onclick="confirm_resign()">Resign
</menu>
</details>
<button onclick="toggle_supply()"><img src="/images/oil-drum.svg"></button>
diff --git a/rules.js b/rules.js
index 308bd53..d6efbf3 100644
--- a/rules.js
+++ b/rules.js
@@ -7692,19 +7692,6 @@ states.game_over = {
}
}
-exports.resign = function (state, current) {
- load_state(state)
- if (game.state !== 'game_over') {
- for (let opponent of exports.roles) {
- if (opponent !== current) {
- goto_game_over(opponent, current + " resigned.")
- break
- }
- }
- }
- return game
-}
-
exports.action = function (state, current, action, arg) {
timeout = Date.now() + TIMEOUT // don't think too long!
load_state(state)