From 1b57158d8f8521b7335f4390bb55ca68fe4097e9 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Sun, 24 Dec 2023 00:40:57 +0100 Subject: Automatic resign menu. --- play.html | 2 -- rules.js | 10 ---------- 2 files changed, 12 deletions(-) diff --git a/play.html b/play.html index 3b323c0..dec92ea 100644 --- a/play.html +++ b/play.html @@ -357,8 +357,6 @@ body.shift .card .number { display: block; }
  • Rules -
  • -
  • Resign
  • diff --git a/rules.js b/rules.js index a497feb..b872423 100644 --- a/rules.js +++ b/rules.js @@ -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 -- cgit v1.2.3