diff options
author | Tor Andersson <tor@ccxvii.net> | 2023-12-24 00:40:57 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2024-01-08 16:36:48 +0100 |
commit | 1b57158d8f8521b7335f4390bb55ca68fe4097e9 (patch) | |
tree | a58e64a9bd709f5797053b7fae2de15c2a714128 | |
parent | 80fcfa68dbce7b9dd79b5c9e6ec3917258a62d9d (diff) | |
download | table-battles-1b57158d8f8521b7335f4390bb55ca68fe4097e9.tar.gz |
Automatic resign menu.
-rw-r--r-- | play.html | 2 | ||||
-rw-r--r-- | rules.js | 10 |
2 files changed, 0 insertions, 12 deletions
@@ -357,8 +357,6 @@ body.shift .card .number { display: block; } <summary><img src="/images/cog.svg"></summary> <menu> <li><a href="info/rules.html" target="_blank">Rules</a> - <li class="resign separator"> - <li class="resign" onclick="confirm_resign()">Resign </menu> </details> </div> @@ -157,16 +157,6 @@ exports.view = function (state, player) { return view } -exports.resign = function (state, player) { - game = state - if (game.state !== 'game_over') { - if (player === P1) - return goto_game_over(P2, player_name(0) + " resigned.") - if (player === P2) - return goto_game_over(P1, player_name(1) + " resigned.") - } -} - function goto_game_over(result, victory) { if (result === P1) victory = player_name(0) + " won:\n" + victory |