diff options
author | Tor Andersson <tor@ccxvii.net> | 2023-12-24 00:39:32 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-12-24 00:39:32 +0100 |
commit | bfd22ff63ef0ffb6771b975e8a389c24eab16567 (patch) | |
tree | 2927f43aa75685ef37d306a45e8cbc4044cd77bf | |
parent | 6ba53ecea10f68df8af6853287047f628e658dc0 (diff) | |
download | pax-pamir-bfd22ff63ef0ffb6771b975e8a389c24eab16567.tar.gz |
Automatic resign menu.
-rw-r--r-- | play.html | 2 | ||||
-rw-r--r-- | rules.js | 20 |
2 files changed, 0 insertions, 22 deletions
@@ -31,8 +31,6 @@ <li><a href="info/rules.html" target="_blank")">Rules</a> <li><a href="info/pac.html" target="_blank")">Player Aid</a> <li><a href="info/cards.html" target="_blank")">Cards</a> - <li class="resign separator"> - <li class="resign" onclick="confirm_resign()">Resign </menu> </details> <button id="suit_button" onclick="on_suit_button()"><img id="favored_suit_icon" src="icons/suit_political.svg"></button> @@ -3224,26 +3224,6 @@ exports.action = function (state, current, action, arg) { return save_game() } -exports.resign = function (state, current) { - load_game(state) - logbr() - log(`${current} resigned.`) - game.state = 'game_over' - game.active = 5 - game.victory = `${current} resigned.` - - if (game.players.length === 2) { - if (current === player_names[0]) - game.result = player_names[1] - else - game.result = player_names[0] - } else { - game.result = "None" - } - - return save_game() -} - exports.view = function (state, current) { current = player_index[current] load_game(state) |