From 0279ac93197aa072991bce8f643ca68e99a54bc7 Mon Sep 17 00:00:00 2001 From: Benjamin Auder Date: Wed, 12 Dec 2018 18:36:50 +0100 Subject: [PATCH] Fix Ultima when no moves are available --- TODO | 3 +-- public/javascripts/variants/Ultima.js | 9 +-------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/TODO b/TODO index f8465c6c..07cef481 100644 --- a/TODO +++ b/TODO @@ -1,3 +1,2 @@ Full detection of repeated positions (including turn) -Debug HalfChess -Implement UltimaChess +In UltimaChess, consider these rules modifications: http://www.inference.org.uk/mackay/ultima/ultima.html diff --git a/public/javascripts/variants/Ultima.js b/public/javascripts/variants/Ultima.js index 1db36919..7f9531eb 100644 --- a/public/javascripts/variants/Ultima.js +++ b/public/javascripts/variants/Ultima.js @@ -368,12 +368,6 @@ class UltimaRules extends ChessRules V.steps[V.ROOK].concat(V.steps[V.BISHOP]), "oneStep"); } - // TODO: verify this assertion - atLeastOneMove() - { - return true; //always at least one possible move - } - underCheck(move) { return false; //there is no check @@ -440,7 +434,6 @@ class UltimaRules extends ChessRules return "1/2"; const color = this.turn; - // TODO: do we need "atLeastOneMove()"? if (this.atLeastOneMove() && this.kingPos[color][0] >= 0) return "*"; @@ -449,7 +442,7 @@ class UltimaRules extends ChessRules checkGameEnd() { - // No valid move: our king disappeared + // Stalemate, or our king disappeared return this.turn == "w" ? "0-1" : "1-0"; } -- 2.44.0